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.
Hi all,
i have a file which contain 2018 Jan - Dec and 2019 Jan - Aug sales data. i add a bar chart by product catalog and seperate 2019 and 2018 by 2 bar, then create 2 slicers (year and month). then i add %GT Line Value on the tooltips,
when i mouse over 2019 bar, it show the % of the total line value (2018+2019).
but i want the result is the % of total line value of each year . thanks in advance.
Joey
Solved! Go to Solution.
Hi @joeytsui
You can use ALL() or ALLSELECTED() in your Measure
Hi joeytsui,
Below is my design:
My sample data
year category amount month
2018 | Drink | 100 | 1 |
2018 | Oil | 200 | 1 |
2018 | Ice cream | 100 | 1 |
2019 | Drink | 400 | 1 |
2019 | Oil | 200 | 1 |
2019 | Ice cream | 200 | 1 |
2018 | Drink | 100 | 2 |
2018 | Oil | 300 | 2 |
2018 | Ice cream | 500 | 2 |
2019 | Drink | 200 | 2 |
2019 | Oil | 100 | 2 |
2019 | Ice cream | 300 | 2 |
2018 | Drink | 100 | 3 |
2018 | Oil | 200 | 3 |
2018 | Ice cream | 100 | 3 |
2019 | Drink | 200 | 3 |
2019 | Oil | 600 | 3 |
2019 | Ice cream | 200 | 3 |
2018 | Drink | 300 | 4 |
2018 | Oil | 100 | 4 |
2018 | Ice cream | 200 | 4 |
2019 | Drink | 100 | 4 |
2019 | Oil | 600 | 4 |
2019 | Ice cream | 500 | 4 |
Then I create a measure like below
% line = SUM ( chart[amount] ) / CALCULATE ( SUM ( chart[amount] ), FILTER ( ALLSELECTED ( chart ), chart[year] = MIN ( chart[year] ) ) )
Then use year and month in slicer, you will get the result like below
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi joeytsui,
Below is my design:
My sample data
year category amount month
2018 | Drink | 100 | 1 |
2018 | Oil | 200 | 1 |
2018 | Ice cream | 100 | 1 |
2019 | Drink | 400 | 1 |
2019 | Oil | 200 | 1 |
2019 | Ice cream | 200 | 1 |
2018 | Drink | 100 | 2 |
2018 | Oil | 300 | 2 |
2018 | Ice cream | 500 | 2 |
2019 | Drink | 200 | 2 |
2019 | Oil | 100 | 2 |
2019 | Ice cream | 300 | 2 |
2018 | Drink | 100 | 3 |
2018 | Oil | 200 | 3 |
2018 | Ice cream | 100 | 3 |
2019 | Drink | 200 | 3 |
2019 | Oil | 600 | 3 |
2019 | Ice cream | 200 | 3 |
2018 | Drink | 300 | 4 |
2018 | Oil | 100 | 4 |
2018 | Ice cream | 200 | 4 |
2019 | Drink | 100 | 4 |
2019 | Oil | 600 | 4 |
2019 | Ice cream | 500 | 4 |
Then I create a measure like below
% line = SUM ( chart[amount] ) / CALCULATE ( SUM ( chart[amount] ), FILTER ( ALLSELECTED ( chart ), chart[year] = MIN ( chart[year] ) ) )
Then use year and month in slicer, you will get the result like below
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @joeytsui
You can use ALL() or ALLSELECTED() in your Measure
sorry for late reply, thank you so much !
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 |
---|---|
107 | |
100 | |
80 | |
63 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |