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.
Hello,
I have a table like the one below, where I have created the column Dif and DIf*Vol. However, when I try to see the total of the column Dif*Vol, it doesnt show the grand total. Instead, he does the same calculation as the other lines. All I want is to have a big number showing the real difference.
Important to note: The B column is a calculated measure and therefore is dynamic. Therefore, I cant edit the data source and do it directly in the database.
Source | A | B (Calc Measure) | Volume | Dif (A-B) | Dif *Vol |
Z | 1100 | 1070 | 30 | 30 | 900 |
Y | 1100 | 1080 | 30 | 20 | 600 |
M | 1100 | 1090 | 30 | 10 | 300 |
N | 1100 | 1090 | 30 | 10 | 300 |
J | 1100 | 1000 | 30 | 100 | 3000 |
5500 | 5330 | 150 | 170 | 25500 |
The red number should be 5100 - the sum of the lines above.
The ideal scenario was to calculate this column directly in the database instead of creating a calculated measure. However, the B column is dynamic and can be changed based on a parameter table.
How can I do that?
Thank you.
Solved! Go to Solution.
Hello @Mareias
You should use SUMX to iterate over Source and sum the values of Dif*Vol.
Try creating a measure that looks something like this:
= SUMX ( VALUES ( YourTable[Source] ), [Dif*Vol] )
I'm assuming [Dif*Vol] is a measure. You could also replace [Dif*Vol] with the components of the calculation as long as they are measures (or wrapped in CALCULATE).
Regards,
Owen
Hello @Mareias
You should use SUMX to iterate over Source and sum the values of Dif*Vol.
Try creating a measure that looks something like this:
= SUMX ( VALUES ( YourTable[Source] ), [Dif*Vol] )
I'm assuming [Dif*Vol] is a measure. You could also replace [Dif*Vol] with the components of the calculation as long as they are measures (or wrapped in CALCULATE).
Regards,
Owen
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 |
---|---|
114 | |
99 | |
82 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |