in this video I talk about the fatal flaw of the Power BI’s Filter pane and how we can fix it with breadcrumbs.
What fatal flaw am I talking about? What the heck is a breadcrumb? Well, watch the video and you will find out.
These are the measures that I have created to implement breadcrumbs in my video:
BrandBreadCrumb =
VAR maxLength = 3
VAR noOfValues =
COUNTROWS ( VALUES ( Brand[Brand] ) )
VAR title =
IF ( noOfValues = 1, “Brand : “, “Brands : “ )
VAR topNValues =
CONCATENATEX (
TOPN ( maxLength, VALUES ( Brand[Brand] ) ),
Brand[Brand],
” – “
)
VAR extra =
IF ( noOfValues – maxLength > 0, ” (+” & noOfValues – maxLength & ” more)” )
RETURN
IF (
COUNTROWS ( ALL ( Brand ) ) = noOfValues,
“Brands : All Brands”,
title & topNValues & extra
)
WeekBreadCrumb =
VAR maxLength = 5
VAR noOfValues =
COUNTROWS ( VALUES ( ‘Date'[Week] ) )
VAR title =
IF ( noOfValues = 1, “Week : “, “Weeks : “ )
VAR topNValues =
CONCATENATEX (
TOPN ( maxLength, VALUES ( ‘Date'[Week] ) ),
‘Date'[Week],
” – “
)
VAR extra =
IF ( noOfValues – maxLength > 0, ” (+” & noOfValues – maxLength & ” more)” )
RETURN
IF (
COUNTROWS ( ALL ( ‘Date'[Week] ) ) = noOfValues,
“Weeks : All Weeks”,
title & topNValues & extra
)