cancel
Showing results for
Did you mean:

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.

Helper I

## Total sum in Matrix

Hi,

I need help to get correct total sum in my Matrix, this should be done in DAX.

I have Pcs in carton from one table on article level, this works on all rows. I need some filter (I guess) to filter out the value 3000 in my DAX. As it is now it calculate 86900/3000=290, thats wrong., it should sum up the rows instead.

1 ACCEPTED SOLUTION
Community Support
This is a measure totals problem. Very common. See this post about it
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

For your case, you could try this way:
measure =
VAR _table =
SUMMARIZE (
'Table',
'Table'[Customer Group],
'Table'[Articles],
"_Cartons", [Cartons]
)
RETURN
SUMX ( _table, [_Cartons] )

Regards,
Lin
Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 REPLIES 4
Community Support
This is a measure totals problem. Very common. See this post about it
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

For your case, you could try this way:
measure =
VAR _table =
SUMMARIZE (
'Table',
'Table'[Customer Group],
'Table'[Articles],
"_Cartons", [Cartons]
)
RETURN
SUMX ( _table, [_Cartons] )

Regards,
Lin
Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Helper I

@v-lili6-msftthanks that you show me how to solve this kind of "measure total problem", very useful.

This is a must know for every developer, thanks again!

Super User

Share the formula created in dax. If possible please share a sample pbix file after removing sensitive information.
Thanks

Helper I

Can share DAX, Not pbix file.

TotalPcs =calculate(sumx(OOLINE;[OBORQT]) *1000;OCUSMA[OKCUNO] <> "2172";OOHEAD[OAORTP] <>"CRU" ;OOLINE[OBORST] <"66")
Cartons = divide([TotalPcs];sum(MIZTL2[STKRT]);0)

Announcements

#### Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

#### Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

#### Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors