Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
I have a Dashboard where I display population. I can select small population areas from a slicer, map visual or stacked bar chart and other visuals update to reflect these selections.
I am trying to get a card to update with the selected small percentage areas as a percentage of grand total when they are selected on either the map visual or stacked bar chart. I can get a measure to work with a slicer, but I can't get this to work when I select small areas using other visuals. I either get an error or 100%
I was going down two paths and neither seem to work no matter what I try or what I find for similar issues online.
1. Create a static measure with the sum of population that doesn't change when items in visuals are selected.
2. Allow me to create a measure that I can divide the total by only items selected.
Any ideas or suggestions to point me in the right direction would be most helpful.
Solved! Go to Solution.
Hi @CiaranC ,
I create a table as you mentioned.
Then I create a measure and here is the DAX code.
Percent =
CALCULATE ( SUM ( 'Table'[Population] ) )
/ CALCULATE ( SUM ( 'Table'[Population] ), ALLSELECTED ( 'Table' ) )
I add a slicer and I can use it in any visual.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @CiaranC ,
I create a table as you mentioned.
Then I create a measure and here is the DAX code.
Percent =
CALCULATE ( SUM ( 'Table'[Population] ) )
/ CALCULATE ( SUM ( 'Table'[Population] ), ALLSELECTED ( 'Table' ) )
I add a slicer and I can use it in any visual.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks Yilong. Good to get this solution but could get this working with a slicer but not by using a visual. I did get a solution using two different measures, one to select all small areas and the second to only bring back data from areas selected on visual.
Got this working from the stacked bar chart but can't get it working from map visual. Doesn't seem to filter through the stacked bar chart visual.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
90 | |
87 | |
84 | |
68 | |
49 |
User | Count |
---|---|
131 | |
111 | |
96 | |
71 | |
67 |