Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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
User | Count |
---|---|
52 | |
46 | |
20 | |
16 | |
13 |
User | Count |
---|---|
108 | |
56 | |
31 | |
19 | |
18 |