Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Help! I am trying to calculate the number of RMAs that are due to shipping, but they are not totalling correctly. Currently, the dax is counting the number of 'Reason Codes', but you can see in the image that there are 6, and it is only showing a total of 3. It is also only looking for a certain 5 codes, that are due to shipping.
I believe I need to do a "=SUMX( SUMMARIZE(" type function, but cant seem get the expression right. You can see in the image that the 'shipped qty' is negative, because it was a return, and that there is an RMA # and Reason ID associated with each RMA.
Hi @rcb0325
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.
Best Regards,
Rico Zhou
Hi @rcb0325
Due to I don't know your data model, I build a sample to have a test.
Sample:
Try this measure:
Measure =
var _T = SUMMARIZE('Table','Table'[No],"Count",
CALCULATE(COUNT('Table'[Description]),
'Table'[Code] = "SHB"||
'Table'[Code] = "SHE"||
'Table'[Code] = "SHO"||
'Table'[Code] = "SHS"||
'Table'[Code] = "SVE"))
VAR _SUM = SUMX(_T,[Count])
Return
_SUM
My sample is easy, you can add other columns you need into _T as below. You need to build a _T table looks like in table visual, then sum the count in it.
...
var _T = SUMMARIZE('Table','Table'[No],'Table'[Status],...(other columns),"Count",
...
...
Return
Or you can try Ashish_Mathur 's way to sum the measure directly.
SalesOrderNumber should be the key in your table use this column in values function.
Measure = SUMX(VALUES(DATA[SalesOrderNumber]),[# of RMAs due to shipping])
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Does this work
Measure = SUMX(VALUES(DATA[ItemNumber]),[# of RMAs due to shipping])
Hope this helps.
Check your Code field that is in the Calculate filter, not sure if the values are as mentioned in the filter. Could be dome space or special characters
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
42 | |
30 | |
27 | |
27 |