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.
Let's say I have this data
Col 1 Col 2
A 10
A 15
B 2
B 6
C 12
A 30
B 12
I want to create a measure that is a column that would add up every instance of ID A, B, C and display it
What I am after is shown in column 3 below
Col 1 Col 2 Col 3
A 10 55
A 15 55
B 2 20
B 6 20
C 12 12
A 30 55
B 12 20
So every time there is a row of ID A, column three will show the cumulative total of 55.
I am trying to do this with a sumx and values function currently but it is not adding up correctly.
Solved! Go to Solution.
Hi @Anonymous ,
Create new measure as bellow
Measure = CALCULATE(SUM(Table1[Col 2]),ALLEXCEPT(Table1,Table1[Col 1]))
In report you select col 1 and col 2(Choose dont summarize) and measure will give you required output .
Bellow is screenshot.
Please mark as solution if this works for you.
Hi @Anonymous ,
Create new measure as bellow
Measure = CALCULATE(SUM(Table1[Col 2]),ALLEXCEPT(Table1,Table1[Col 1]))
In report you select col 1 and col 2(Choose dont summarize) and measure will give you required output .
Bellow is screenshot.
Please mark as solution if this works for you.
@Anonymous
Hi, you can use this measure:
TotalbyColumn1 = CALCULATE ( SUM ( Table1[Column2] ); ALLEXCEPT ( Table1; Table1[Column1] ) )
Regards
Victor
Lima - Peru
@Vvelarde Thank you for the quick response. When I tried that formula in a calc column and I go look at that data in the table it shows 1's all the way down for that column. Any idea why?
But when I put this new column in a table it has the correct calculation totals.
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 |
---|---|
109 | |
95 | |
77 | |
65 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |