Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
digitalPlay
Frequent Visitor

SUMX Row Values Incorrect vs Total

I've got a simple formula but it's not giving the correct result in the row level.
If the Overspend Flag is not the same from last month then Overspend value will be taken otherwise, none.
It generally works but for some reason there are rows that takes the value per row that doesn't meet the parameter.

The first line doesn't meet the parameter but the formula picks it up yet excluded in the Total.

Could someone please have a look and advise?

digitalPlay_0-1687190412256.png

 

4 REPLIES 4
Kishore_KVN
Super User
Super User

Hello @digitalPlay , Can you please try using SUM instead of MAX if you have months in the row context. Let me know if it works. 

 

If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!

Hi @Kishore_KVN , I'm afraid it spits out an error

digitalPlay_1-1687243674918.png

 

digitalPlay_0-1687243644415.png

 

Hello @digitalPlay ,  please change the column data type for Overspend Flag. Values in it are in text select that column and in column tools select data type as whole number or decimal number depends on the data. Then this formula will work. 

 

If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!

thanks for that! however, if I put their groupings in the columns, it will show the overall total (which is correct) but the value and count will not be shown per group. If the ID has the same group month on month, it will show the values, however if it changes the next month, no value is picked up per group on that month but the total will still be correct. I guess groupby will help but my attempt to add it in the formula has failed.

digitalPlay_1-1687250321953.png

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors