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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
joao_maia_ext
Frequent Visitor

Total not Correct

Hello Freinds,

 

I've being struggling with a relative simple and recurrent problem I believe.. I Have a set of measures and results inside the table are ok, although the total is not correct.

 
I create a measure: 07_ OOP/OE Execução that multiply measure: 04 Razao Peso OOP/OE with a collum _IND/OOP Execução (sum). The results by line are corrected but i can't get the correct value for the total sum...
 
Formula Measure:
07_ OOP/OE Execução = SUMX('#TimeLine IND','#TimeLine IND'[_ IND/OOP Execução])*'0 - Medidas gerais'[04_ Razao PesoOOP/OE#]

joao_maia_ext_0-1625561979596.png

 

I've tried summarize and other formulas with no success.. Can someone help me? 🙂

 

best regards

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

Hi  @joao_maia_ext ,

You can use HASONEVALUE to resolve incorrect totals.

Here are the steps you can follow:

1. According to your description, I created sample data.

vyangliumsft_0-1625724729322.png

2. First, suppose you have a measure and find that the sum calculated by this metric is incorrect.

Measure_Sum =
IF(SUM('Table'[Amount])<1000,0,SUM('Table'[Amount]))

3. Then to calculate the sum, you can create a measure.

Calculate Sum =
var Table1=SUMMARIZE('Table','Table'[Date],"_value",[Measure_Sum])
return IF(HASONEVALUE('Table'[Date]),[Measure_Sum],SUMX(Table1,[_value]))

4. Result.

vyangliumsft_1-1625724729325.png

 

Best Regards,

Liu Yang

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

4 REPLIES 4
v-yangliu-msft
Community Support
Community Support

Hi  @joao_maia_ext ,

You can use HASONEVALUE to resolve incorrect totals.

Here are the steps you can follow:

1. According to your description, I created sample data.

vyangliumsft_0-1625724729322.png

2. First, suppose you have a measure and find that the sum calculated by this metric is incorrect.

Measure_Sum =
IF(SUM('Table'[Amount])<1000,0,SUM('Table'[Amount]))

3. Then to calculate the sum, you can create a measure.

Calculate Sum =
var Table1=SUMMARIZE('Table','Table'[Date],"_value",[Measure_Sum])
return IF(HASONEVALUE('Table'[Date]),[Measure_Sum],SUMX(Table1,[_value]))

4. Result.

vyangliumsft_1-1625724729325.png

 

Best Regards,

Liu Yang

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

 

Pragati11
Super User
Super User

Hi @joao_maia_ext ,

 

Check this existing thread for a solution given by @Greg_Deckler .

https://community.powerbi.com/t5/Desktop/Total-of-measure-is-wrong/m-p/367260

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Thank you for the reply! Can you identify which thread? 🙂

Hi @joao_maia_ext ,

 

See above.

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors