cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Total of measure is wrong

Hi all,

 

Im am stuck with the following problem. I have several fact tables I want to slice to period and product category. However, a part of my fact tables contains project-specific amounts, which are not assigned to a product category. These amounts are assigned to product categories by using a measure (for example, in the project 1 80% of the sales is product A, 20% is prodduct B, the projectcosts of € 1.000 will be assigned 800 to A and 200 to B). The measure works fine for each project indivvidually, but when I put this measure in a table, the total of the column isnt equal to the sum of the measures for the individual projects, but the measure is calculated over the selected projects and total amount, in which case the result is useless.

 

Is there a way to sum the individual results of the measures for the selected projects?

 

Best regards,

Theo

1 ACCEPTED SOLUTION
Super User IV
Super User IV

@TheoM- This is a common issue, this post explains why and how to resolve it:

 

https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

 


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Screencap.jpgimage.png

 

 

 

 

 

 

Hi guys,

I got a similar problem that I cannot fix.

1. I am trying to calculate the total cost [ExtCostLowest] if a lower unit cost [UnitCostLowest] is used.
2. [ExtCostLowest] = [TranQty] * [UnitCostLowest]
3. The individual rows in column [ExtCostLowest] return my expected results but not the total in column [ExtCostLowest].

4. The total in column [ExtCostLowest] somehow returns the same total as [ExtCost], which is calculated based on the original unit cost.

 

Much appreciated for your help.

Anonymous
Not applicable

@Anonymous 
Hey I have a similar issue, did you manage to solve your problem?

Anonymous
Not applicable

You need to re-do everything in the second measure, i.e. you cannot pass the first measure as a parameter into the second measure, as the measures are independent.


IF ( HASONEFILTER (Measure) = TRUE() ; Measure1 ; Measure2)

Yep, you should create two measures, a measure for a "normal" row and a measure for a "(sub)total" row and apply the appropriate measure depending on HASONEFILTER is TRUE whether FALSE. See the link in the post that was marked as solution.

 

Super User IV
Super User IV

@TheoM- This is a common issue, this post explains why and how to resolve it:

 

https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

 


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

Thanks @Greg_Deckler, solved the problem!

Awesome! That post definitely comes in handy!!


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors