Forum Discussion
DAX vs Sum calculation (Difference in total)
At the day level are the results of the two formulas the same, only at the week level they are different (Difference in total = 5391.02 - 5378.52 = 12.5).
Can someone explain this or what am I doing wrong?
Each day is one line per employee in the data set.
Formules
Aantal_FTE =
Sum(Fact_Medewerker_Verzuim[Aantal_FTE]),
# FTE in dienst (1) =
VAR MaxSelectionDate = MAX ('DIM_Kalender'[Date] )
VAR MinSelectionDate = MIN ('DIM_Kalender'[Date] )
RETURN
CALCULATE (
Sum(Fact_Medewerker_Verzuim[Aantal_FTE]),
FILTER (
'Fact_Medewerker_Verzuim',
( Fact_Medewerker_Verzuim[Datum_In_Dienst] <= MinSelectionDate && Fact_Medewerker_Verzuim[Datum_Uit_Dienst] >= MaxSelectionDate )
)
)
Thanks in advance for your help!
NielsT This looks like a measure totals problem. Very common. See my post about it here: 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
1 Reply
- Greg_Deckler
Community Champion
NielsT This looks like a measure totals problem. Very common. See my post about it here: 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