Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi community, In this time I try to display a pie chart with a hierarchy (Continent-> Region -> Country) so with drill down option in the country level. I would like to display a text which the users indicate the drill down option selected. e..g Sum of population by continent ASIA, Region Eastern asia
In the headers option, there is an iacon with filters affecting the visual is ok (Asia, Eastern asia), but the user should be do click in the icon is there a workaround to put this "filters values" in a measure? In a card dynamic. (title visual)
Solved! Go to Solution.
Hello @Peter_23
try this measure
Drilldown_Label =
VAR SelectedContinent = SELECTEDVALUE('Geo'[Continent])
VAR SelectedRegion = SELECTEDVALUE('Geo'[Region])
VAR SelectedCountry = SELECTEDVALUE('Geo'[Country])
RETURN
"Drilldown Context: " &
IF(NOT ISBLANK(SelectedContinent), "Continent = " & SelectedContinent, "") &
IF(NOT ISBLANK(SelectedRegion), ", Region = " & SelectedRegion, "") &
IF(NOT ISBLANK(SelectedCountry), ", Country = " & SelectedCountry, "")
Thanks,
Pankaj Namekar | LinkedIn
If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.
Hey, great question! I’ve actually been trying to do something similar with drill-down visuals and it can be surprisingly tricky to make the selected context clear without relying on the filter icon. One workaround that worked for me was using a DAX measure to dynamically show what level the user has drilled into.
Hi @Peter_23
Please try this:
dynamic title = // Build a dynamic title with labels and selected values
VAR _Geo =
SELECTEDVALUE ( Geo[Geo] )
VAR _Cat =
SELECTEDVALUE ( Category[Category] )
VAR _Months =
SELECTEDVALUE ( Dates[Month and Year] )
VAR _MeasureName = "Sum of Transactions"
VAR _Parts =
{ ( "Geo", _Geo ), ( "Category", _Cat ), ( "Month", _Months ) } // Table of all label-value pairs
VAR _Parts_Filtered =
FILTER (
_Parts,
NOT ( ISBLANK ( [Value2] ) ) // Filter out blanks
)
VAR _Dimensions = CONCATENATEX ( _Parts, [Value1], ", " ) // Just dimension names from _Parts (not filtered)
VAR _Result =
_MeasureName &
" by " &
IF (
COUNTROWS ( _Parts_Filtered ) > 0,
CONCATENATEX ( _Parts_Filtered, [Value1] & ": " & [Value2], ", " ), // Labeled values if any selected
_Dimensions // Otherwise just dimension names
)
RETURN
_Result
Please see the attached pbix.
Hello @Peter_23
try this measure
Drilldown_Label =
VAR SelectedContinent = SELECTEDVALUE('Geo'[Continent])
VAR SelectedRegion = SELECTEDVALUE('Geo'[Region])
VAR SelectedCountry = SELECTEDVALUE('Geo'[Country])
RETURN
"Drilldown Context: " &
IF(NOT ISBLANK(SelectedContinent), "Continent = " & SelectedContinent, "") &
IF(NOT ISBLANK(SelectedRegion), ", Region = " & SelectedRegion, "") &
IF(NOT ISBLANK(SelectedCountry), ", Country = " & SelectedCountry, "")
Thanks,
Pankaj Namekar | LinkedIn
If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.
User | Count |
---|---|
84 | |
79 | |
70 | |
47 | |
42 |
User | Count |
---|---|
108 | |
52 | |
50 | |
40 | |
40 |