Skip to main content
cancel
Showing results for 
Search instead 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.

Reply
ColinPelham
Frequent Visitor

Calculating Total of SUMX

Hello,


I'm having some issues using SUMX in a table. I am using the following calculation:

 

SUMX(FILTER('Table1', [Date]>MAX(Sales[Reporting_Week])),[Value])

 

This works on a row by row basis for each country in a table, but the grand total picks the max week of any country, then does the calculation from that (so doesn't equal the sum of all the rows).

Is there a way I can work around this?

 

Thank you for any help,

 

Colin

1 REPLY 1
AlB
Super User
Super User

Hi @ColinPelham

Can you share the pbix? That would be helpful. Otherwise explain a bit more what tables of your model are involved in the issue at hand. Use the table name in columns names as well to make the code clearer as in TableName[ColumnName] rather than just [ColumnName]. Is [Value] a measure?

From what you say it might be an issue with (lack of) context transition but it's hard to tell with the info provided.  

Helpful resources

Announcements
Microsoft Fabric Learn Together

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

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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