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
Tripb44
Helper II
Helper II

Average Totaling incorrectly

My total of a measure is not totalling correctly.  Circled below is the issue, if I export this table, the total of that column is around $12,000,000.  Any advice to modify the measure dax to reflect the correct total is much appreciated.  Thanks.


Tripb44_0-1638381479825.png

 

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @Tripb44 ,

Your wrong average in total should be caused by "SUMX(VALUES(...),_avginvoice)" in false part in IF function. This code won't return correct result if you use it in same code. I suggest you to create a new measure based on [Average Invoice p2]. You can let [Average Invoice p2] return "_avginvoice" directly.

New code.

NewMeasure = SUMX(VALUES('Cycletime_Invoice_Date(2)'[InvoiceNum]),[Average Invoice p2] )

Then add this new measure into your table visual, it will return correct result.

 

Best Regards,
Rico Zhou

 

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

 

View solution in original post

1 REPLY 1
v-rzhou-msft
Community Support
Community Support

Hi @Tripb44 ,

Your wrong average in total should be caused by "SUMX(VALUES(...),_avginvoice)" in false part in IF function. This code won't return correct result if you use it in same code. I suggest you to create a new measure based on [Average Invoice p2]. You can let [Average Invoice p2] return "_avginvoice" directly.

New code.

NewMeasure = SUMX(VALUES('Cycletime_Invoice_Date(2)'[InvoiceNum]),[Average Invoice p2] )

Then add this new measure into your table visual, it will return correct result.

 

Best Regards,
Rico Zhou

 

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

 

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.