March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have the following data:
Dimension1, Dimension2, Value1, and Value2. Now, I want each row to be calculated first in Power BI (PBI), and then the sum of all individual positions from Dimension2 should be added for Dimension1.
Here's how it should look:
Dimension 1 | Dimension 2 | Wert 1 | Wert 2 | Ergebnis |
A | AA | 1 | 5 | = 1/5 --> 0,2 |
A | BB | 10 | 10 | = 10/10 --> 1 |
A | Total | = 1,2 |
But that's how it looks in PBI:
Dimension 1 | Dimension 2 | Wert 1 | Wert 2 | Ergebnis |
A | AA | 1 | 5 | = 0,2 |
A | BB | 10 | 10 | = 1 |
A | Total | = 0,73 |
I've already tried Summarize with no success. Can you help me please?
Solved! Go to Solution.
Hi @PWRBI ,
If I understand your issue correctly, you might try this.
Column = IF(Summary[Dim2]="Total",Sumx(Summary,Divide(Summary[Val1],Summary[Val2])),Divide(Summary[Val1],Summary[Val2]))
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel
Proud to be a Super User!
Hi @PWRBI ,
How do you get 38,516.78 on the first row based on this formula. If you wish me to look at this please include an explanation of what you are trying to do and make your example much clearer than what you did here. Otherwise you may want to re post this.
Thank you,
Nathaniel
Proud to be a Super User!
Hi, how can I Upload a PBI File for you with an example?
Hi @PWRBI ,
If I understand your issue correctly, you might try this.
Column = IF(Summary[Dim2]="Total",Sumx(Summary,Divide(Summary[Val1],Summary[Val2])),Divide(Summary[Val1],Summary[Val2]))
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel
Proud to be a Super User!
No, unfortunately it doesn't work, it's not what I expect. Total is not a dimension, but the total line of Power BI, where the sum must be calculated correctly
Hi @PWRBI ,
If I understand your issue correctly, you might try this - it was not clear in your picture.
Add a column to your table and add it to the visual.
If this is not what you wanted, please add some more explanation.
Column = Divide(Summary[Val1],Summary[Val2])
Original table
With Calculated Column
In Visual
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel
Proud to be a Super User!
Dim1 | Dim2 | VAL1 | VAL2 | VAL3 | VAL4 | Result | Measure |
A | AA | 0 | 37183,52 | -49785,07 | -51570,17 | 38516,7772 | VAL1+(VAL2/VAL3*VAL4) |
A | BB | 0 | 6234,33 | -65,73 | -59 | 5596,00593 | VAL1+(VAL2/VAL3*VAL4) |
0 | 43417,85 | -49850,8 | -51629,17 | 44966,7319 | this is the result that is displayed | ||
44112,7831 | this is the result I expect |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
15 | |
12 | |
9 | |
8 |
User | Count |
---|---|
41 | |
32 | |
29 | |
12 | |
12 |