Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I Have Sales Hireachy Consisting of Depot,Region,Division and Company all siting in a Hirearchal Slicer.
What Id like to do is to have a card that shows the value that was selected whether it was a depot or a region ie If a region was selected then show the region.
Ive tried to create a measure and then use that measure for the card but none of the functions appear to work eg SelectedValue
Any ideas how i might achieve this?
Solved! Go to Solution.
Hi Think I have got this sorted now
My example data:
Depot Hirearchy
Transactions
The issue I was having that I couldnt get a card to dynamically show the value id selected in the hirearchy ie if I picked the South Division I wanted the Card to show South.
This was my solution:
Create a measure ( I called it Depot Selection) in the Depot Hirearchy and use the following formula
DepotSelected = " Transactions For " & IF(ISFILTERED('Depot Hirearchy'[Depot]),SELECTEDVALUE('Depot Hirearchy'[Depot]),IF(ISFILTERED('Depot Hirearchy'[Region]),SELECTEDVALUE('Depot Hirearchy'[Region]),IF(ISFILTERED('Depot Hirearchy'[Division]),SELECTEDVALUE('Depot Hirearchy'[Division]),IF(ISFILTERED('Depot Hirearchy'[Comapny]),SELECTEDVALUE('Depot Hirearchy'[Company])))))
This is in reverse order to the Hirearchy as what I discovered was that all the levels above the level you choose are also "Filtered" so by using the IF statement in reverse order I can find out which level is the first Filtered level which logically must be the level chosen.
This is what the sample report looks like
Many thanks for replying and offering to help
Can you post some sample data so that I can try this out? I am thinking that if you do something like a SUMMARIZE of your table or perhaps a CALCULATETABLE or just the current table that you could grab the MAXX of whatever column value you are looking for since your current table should only have the values currently selected in the hierarchy slicer.
Hi Think I have got this sorted now
My example data:
Depot Hirearchy
Transactions
The issue I was having that I couldnt get a card to dynamically show the value id selected in the hirearchy ie if I picked the South Division I wanted the Card to show South.
This was my solution:
Create a measure ( I called it Depot Selection) in the Depot Hirearchy and use the following formula
DepotSelected = " Transactions For " & IF(ISFILTERED('Depot Hirearchy'[Depot]),SELECTEDVALUE('Depot Hirearchy'[Depot]),IF(ISFILTERED('Depot Hirearchy'[Region]),SELECTEDVALUE('Depot Hirearchy'[Region]),IF(ISFILTERED('Depot Hirearchy'[Division]),SELECTEDVALUE('Depot Hirearchy'[Division]),IF(ISFILTERED('Depot Hirearchy'[Comapny]),SELECTEDVALUE('Depot Hirearchy'[Company])))))
This is in reverse order to the Hirearchy as what I discovered was that all the levels above the level you choose are also "Filtered" so by using the IF statement in reverse order I can find out which level is the first Filtered level which logically must be the level chosen.
This is what the sample report looks like
Many thanks for replying and offering to help