Forum Discussion
Anonymous
2 years agoNot applicable
Incorrect Total
Hi, This DAX is producing the correct values for 4 Months individually but the incorrect value for the total. Ans = VAR ActDays = MAXX ('Plan', [Day_Cnt]) - MAXX ('Plan', [Rem_Cnt]) VAR Rem...
- Anonymous2 years ago
I created the multiplication at a column level and a measure to add it up. That solved it. However, I do like these ideas and I will try them.
Thank you for the answers.
tamerj1
2 years agoCommunity Champion
Hi Anonymous
Please try
Ans =
SUMX (
VALUES ( 'Table'[YearMonth] ),
CALCULATE (
VAR RemDays =
MAXX ( 'Plan', [Rem_Cnt] )
VAR ActDays =
MAXX ( 'Plan', [Day_Cnt] ) - RemDays
VAR Result =
CALCULATE (
SUMX ( 'Details', DIVIDE ( [MyValue], ActDays ) * RemDays ),
MyDim[DimValue] <> "Do not want this"
)
RETURN
Result
)
)