To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello all,
I have the below line chart; the 2 lines represent 2 different years, 2023 and 2024:
Instead of the whole numbers you see, I want to show the percentages of the individual lines total.
The dark blue lines total is 370, the light blue lines total is 249.
When I try to change it to "Percentage of grand total", I get the wrong percentages.
Now, I understand where these percentages are coming from. BI is calculating the total of the two lines together (which is 619) and diving the data points by that number.
HOW do I get the percentages to divide by the total of that year and not the total of both years?
The total for 2024 = 270
The total for 2023 = 249
Solved! Go to Solution.
@hI @e175429, try these measures below, and if you encounter any issues, let me know.
Total2023 = CALCULATE(SUM(TableName[Value]), TableName[Year] = 2023)
Total2024 = CALCULATE(SUM(TableName[Value]), TableName[Year] = 2024)
Percent2023 =
DIVIDE(
SUM(TableName[Value]),
[Total2023]
) * 100
Percent2024 =
DIVIDE(
SUM(TableName[Value]),
[Total2024]
) * 100
Did I answer your question? If so, please mark my post as the solution!
Your Kudos are much appreciated! Proud to be a Resolver IV !
@hI @e175429, try these measures below, and if you encounter any issues, let me know.
Total2023 = CALCULATE(SUM(TableName[Value]), TableName[Year] = 2023)
Total2024 = CALCULATE(SUM(TableName[Value]), TableName[Year] = 2024)
Percent2023 =
DIVIDE(
SUM(TableName[Value]),
[Total2023]
) * 100
Percent2024 =
DIVIDE(
SUM(TableName[Value]),
[Total2024]
) * 100
Did I answer your question? If so, please mark my post as the solution!
Your Kudos are much appreciated! Proud to be a Resolver IV !
When I try to change it to "Percentage of grand total", I get the wrong percentages.
Instead of using implicit measures you need to use explicit measures (ie write your own) to apply the appropriate filters.
User | Count |
---|---|
14 | |
11 | |
6 | |
6 | |
5 |
User | Count |
---|---|
29 | |
17 | |
11 | |
7 | |
5 |