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,
I'm a beginner in Power BI and I have (I think?) a simple question:
I have currently this table (Total is a calculated column)
Col1 | Value | Total |
A1 | 100 | |
A2 | 200 | |
B1 | 300 | |
B2 | 400 | |
A.Total | ||
B.Total |
And I need to calculate the Total column as follow:
A.Total = Value[A1] + Value[A2]
B.Total = Value[B1] + Value[B2]
final result:
Col1 | Value | Total |
A1 | 100 | |
A2 | 200 | |
B1 | 300 | |
B2 | 400 | |
A.Total | 300 | |
B.Total | 700 |
Im not sure if I should use a measure or a calculated column for this calculation, for now: I'm trying with a Custom Column, Can you please advise if this script is correct ?
Calculte(SUM(["A1"]+["A2"]),FILTER(["Total"]="A.Total"))
and
Calculte(SUM(["B1"]+["B2"]),FILTER(["Total"]="B.Total"))
Solved! Go to Solution.
Hi,
Sorry for the late reply, I was in vacation.
I'm not sure if this is the right method by the admin to mark a reply as solved, that's definetly NOT the solution that I was looking for. Having admin rights doesn't mean you can do whatever you want...
The right way that I did is:
1) Pivot those rows into columns in Power BI Queries with language M.
2) Create a calculated column to sum up the new pivoted columns.
3) Unpivot those columns into rows.
This wroked great !
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 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |