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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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