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 the below table. Each company has a value for attributes A, B or C. I want to rank each company based on the sum of all its attribute values.
Company | Attribute | Value | Sum of values per company | Rank |
Apple | A | 1 | 6 | 4 |
Apple | B | 2 | 6 | 4 |
Apple | C | 3 | 6 | 4 |
Tesla | A | 4 | 9 | 3 |
Tesla | B | 5 | 9 | 3 |
Microsoft | A | 6 | 13 | 2 |
Microsoft | B | 7 | 13 | 2 |
Airbus | A | 8 | 26 | 1 |
Airbus | B | 9 | 26 | 1 |
Airbus | C | 9 | 26 | 1 |
I need help with the 2 columns on the right (sum and rank)
The rank needs to be the same for all rows for the company so that I can use this in a visual.
Any help will be greatly appreciated. Thank you.
Solved! Go to Solution.
@NNaj , Try like
Sum of values per = calculate(sum(Table[Value]), allexpect(Table, Table[Company]))
or
Sum of values per = calculate(sum(Table[Value]), filter(allselected(Table, Table[Company]) = max(Table[Company])))
Rank = rankx(allselected(Table[Company]),calculate(sum(Table[Value])))
or
Rank = rankx(allselected(Table[Company]),[Sum of values per])
@NNaj , Try like
Sum of values per = calculate(sum(Table[Value]), allexpect(Table, Table[Company]))
or
Sum of values per = calculate(sum(Table[Value]), filter(allselected(Table, Table[Company]) = max(Table[Company])))
Rank = rankx(allselected(Table[Company]),calculate(sum(Table[Value])))
or
Rank = rankx(allselected(Table[Company]),[Sum of values per])
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |