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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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