Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
I'm presenting data through a combination of a bar chart and two pie charts.
Pie Chart 1:
i) When all years of the bar chart are selected, it displays the percentage of each category.
ii) When only one year is selected from the bar chart, it reveals the percentage of each category for that specific year. For instance, if 2023 is selected, it shows B 42.97% (42.97%).
Pie Chart 2:
i) Similarly, when all years of the bar chart are selected, it exhibits the percentage of each category.
ii) However, when only one year is chosen from the bar chart, it contrasts the percentage of each category for that year against the overall percentages across all years. For instance, if 2023 is selected, it might show B 55 (18.58%).
Expected Output from Chart 1: When selecting a single year, such as 2023, I anticipate seeing the count of each category along with its corresponding percentage, like B 55 (42.97%).
You can get the power bi file from the give link (Google Drive).
Solved! Go to Solution.
Hi @0Experience ,
Add the following measure:
Values Measure =
IF(ISFILTERED('Table'[Year]), CALCULATE(SUM('Table'[Count]) , 'Table'[Year] = MAX('Table'[Year])), SUM('Table'[Count]))
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @0Experience ,
Add the following measure:
Values Measure =
IF(ISFILTERED('Table'[Year]), CALCULATE(SUM('Table'[Count]) , 'Table'[Year] = MAX('Table'[Year])), SUM('Table'[Count]))
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThanks @MFelix
Your attached file is woriking expectedly. However, if I write the code on my file and make a new chart, it is not working the expected way. It works like the chart 2.
Did you make any other seetings?
What I understand, you highlighted the filter option from the "interaction" settings from the "Format" option.
If we do this, then we do not need to write the measure you gave.
However, I am accepting your answer as I got the idea from your reply.
User | Count |
---|---|
97 | |
87 | |
77 | |
67 | |
63 |
User | Count |
---|---|
111 | |
96 | |
96 | |
67 | |
63 |