cancel
Showing results for
Did you mean:
Highlighted
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

Accepted Solutions
Community Support

## Re: Sum of measures and columns

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.
4 REPLIES 4
Super User IV

## Re: Sum of measures and columns

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

In case it does not help, please provide additional information and mark me with @
My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP,
HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Super User! Linkedin

Frequent Visitor

## Re: Sum of measures and columns

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!
Community Support

## Re: Sum of measures and columns

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.
Frequent Visitor

## Re: Sum of measures and columns

Thank you!

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

Thank you!

Announcements

#### New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

#### ‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

#### Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

#### Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

#### Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors