Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I'm new to Power BI and I'm looking to find the percentage on a stacked column chart or 100% chart after a filter selected. Example when no filters are selected the % amounts are shown as % of grand total which is correct but when a filter is selected I want the new % numbers to be shown as the filtered totals and not the grand totals.
In the table below the grand totoal percentages for the RED job are 21% for ACT, 14% for CNL and 21% for MOD. Which these percentage are from the grand total of 14 jobs.
If I only select the RED jobs then the percentages would change to 38% for ACT, 25% for CNL and 38% for MOD. All based off a grand total of 8 RED jobs.
How do I get my stacked column chart to show the change in percentage when a filter is selected and not the percentage base on the grand total?
Solved! Go to Solution.
Try below the DAX measure.
PercentageVal =
VAR total =
CALCULATE ( COUNT ( Job_Status[Job] ), ALL ( Job_Status ) )
VAR countVal =
CALCULATE ( COUNT ( Job_Status[Job] ) )
VAR result = countVal / total
RETURN
result
Let me know your comments.
Regards,
Nandu Krishna
Hi Nandu
This solution worked for me. The only thing I had to change was changing ALL to ALLSELECTED.
Thanks,
HW
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
54 | |
24 | |
23 | |
15 | |
11 |
User | Count |
---|---|
76 | |
59 | |
46 | |
17 | |
12 |