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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
BrunoSerpeloni
Frequent Visitor

Sum of measures and columns

I Have a field, that is the forecast of my company, and sometimes I have the correct value to put for some areas and for other areas I don't have, so I use a measure to estiamte this forecast based on what I Have of MTD and the days lefts to finish the mont, it is a simple rule of three.

 

But when I get this combination, the sum total of my table doesn't show the correct sum, it only summarize the values that I have in the columns of the table, it doens't sum the calculate measure of rule of three. 

1 ACCEPTED SOLUTION

HI @BrunoSerpeloni 

This looks like a measure totals problem. Very common. See this post about it
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

 

For your case, Just create a new measure as below logic:

Measure_Total = 
VAR __table = SUMMARIZE('Table',[Attribute Name1],[Attribute Name2],..., "__value",[Formula1])
RETURN
SUMX(__table,[__value])

 

If you still have the problem, please share a simple sample pbix file and your expected output.

 

Regards,

Lin

Community Support Team _ Lin
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
amitchandak
Super User
Super User

Can you share the formula and point the one that is not working.

Hi!

 

This is the formula:

 

Formula1= IF(([#Miles_Sum]) = 0;[#Miles (MTD)]/DAY(MAX(Dates[Day]))*MAX(Dates[days_month]);[#Miles_Sum])
 
Where I have the sum of columns:
#Miles_Sum = sum('FRCST'[vl_base_miles_forecast]) + sum('FRCST'[vl_bonus_miles_forecast])
 
 
The incorrect sum is with Formula1
 
 
Thanks!

HI @BrunoSerpeloni 

This looks like a measure totals problem. Very common. See this post about it
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

 

For your case, Just create a new measure as below logic:

Measure_Total = 
VAR __table = SUMMARIZE('Table',[Attribute Name1],[Attribute Name2],..., "__value",[Formula1])
RETURN
SUMX(__table,[__value])

 

If you still have the problem, please share a simple sample pbix file and your expected output.

 

Regards,

Lin

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

Thank you!

 

It worked, I had only to add "IFHASONEVALUE" in the return on your formula and it's working now.

 

Thank you!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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