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 have got a table like this
Land | Group | Type | Value |
China | A | XY | 10 |
Germany | A | ZU | 21 |
USA | B | XY | 15 |
Spain | B | ZU | 16 |
China | C | XY | 8 |
USA | C | XY | 25 |
China | A | XY | 20 |
Germany | A | ZU | 15 |
USA | B | XY | 3 |
Spain | B | XY | 15 |
China | C | XY | 8 |
USA | C | XY | 20 |
Now I want to calculate the Sum the column Value which is grouped by Land, Group and type (for example). To get this:
Land | Group | Type | Sum Value |
China | A | XY | 30 |
China | C | XY | 16 |
Germany | A | ZU | 36 |
Spain | B | ZU | 16 |
Spain | B | XY | 15 |
USA | B | XY | 18 |
USA | C | XY | 45 |
Any Ideas?
Best regards
Timo
Solved! Go to Solution.
@Anonymous Please try this as a "New Table"
GroupingTestOut = SUMMARIZECOLUMNS(GroupingTest[Land],GroupingTest[Group],GroupingTest[Type],"Total Value",SUM(GroupingTest[Value]))
Proud to be a PBI Community Champion
Hi @Anonymous ,
You can create a calculated column like DAX below.
Sum Value = CALCULATE(SUM('Table'[Value]),FILTER(ALLSELECTED('Table'),'Table'[Land]=EARLIER('Table'[Land])&&'Table'[Group]=EARLIER('Table'[Group])&&'Table'[Type]=EARLIER('Table'[Type])))
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Depending on what you want to achieve, this can be done with a simple matrix.
Add Land, Group, Type in Rows
Add Value in Values
Drill down and format as required.
Hi @Anonymous ,
thanks for your reply.
But I need it as a calculated column. I have to calculate some other values with this column.
BR
Timo
Try this:
CalcTable = SUMMARIZECOLUMNS ( Table1[Land], Table1[Group], Table1[Type], "Sum Value", SUM ( Table1[Value] ) )
@Anonymous Please try this as a "New Table"
GroupingTestOut = SUMMARIZECOLUMNS(GroupingTest[Land],GroupingTest[Group],GroupingTest[Type],"Total Value",SUM(GroupingTest[Value]))
Proud to be a PBI Community Champion
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 |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |