Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

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 RemDays = MAXX ('Plan', [Rem_Cnt])
VAR Result = CALCULATE (
    SUMX ('Details', DIVIDE ([MyValue], ActDays) * RemDays),
   MyDim[DimValue] <> "Do not want this"
    )
I am seeing this:
YearMonthActDaysRemDaysMyValueAct
Jan 20242301,8296,520
Feb 20242101,924,5970
Mar 20242101,867,8650
Apr 20249132,067,3811,221,633
Total1013

8,410,212

6,467,862

I need Total Act to be 1,221,633
  • Anonymous's avatar
    Anonymous
    2 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.

3 Replies