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
TheoM
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
Greg_Deckler
Super User
Super User

@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!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.

 

Greg_Deckler
Super User
Super User

@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!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Thanks @Greg_Deckler, solved the problem!

Awesome! That post definitely comes in handy!!


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.