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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
melaniemdavis
Frequent Visitor

Wrong column total for if statement

Hi -

 

I have been reading through the different solutions for showing the expected total in a table for an if statement but haven't been able to apply it to my particular report. Possibly because I have measures created from other measures.

 

 

GreaterThan300Over60Days = IF([TotOver60] >300, [TotOver60], 0)GreaterThan300Over60Days = IF([TotOver60] >300, [TotOver60], 0)

The right two columns are my issue. Started with far right column and only wanted to show lines over $300. I used this if statement.

GreaterThan300Over60Days = IF([TotOver60] >300, [TotOver60], 0)
 
The individual lines are showing the information I wanted but the subtotal should be different than the TotOver60. 
 
Please let me know how I can get the total I'm looking for and if you need any other info.
 
Thank you!

 

1 ACCEPTED SOLUTION
Tad17
Solution Sage
Solution Sage

Hey @melaniemdavis 

 

You'll want to use a SUMX formula instead of (or in addition to) an IF to get the total to calculate correctly. Check out the link below:

 

https://community.powerbi.com/t5/Desktop/Matrix-Table-Total-Row-not-calculating-right-totals/td-p/44...

 

Your formula would be something like "GreaterThan300Over60Days = SUMX([TotOver60] >300, [TotOver60])"

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

HI @melaniemdavis,

I'd like to suggest you take a look at following blog about measure total level calculation:

Measure Totals, The Final Word 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Tad17
Solution Sage
Solution Sage

Hey @melaniemdavis 

 

You'll want to use a SUMX formula instead of (or in addition to) an IF to get the total to calculate correctly. Check out the link below:

 

https://community.powerbi.com/t5/Desktop/Matrix-Table-Total-Row-not-calculating-right-totals/td-p/44...

 

Your formula would be something like "GreaterThan300Over60Days = SUMX([TotOver60] >300, [TotOver60])"

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.