Forum Discussion

Uzi2019's avatar
Uzi2019
Icon for Community Champion rankCommunity Champion
4 years ago
Solved

Incorrect measure total in Matrix

Hi Experts,
Greg_Deckler 
I have tried using summarize, sumx and hasonevalue function still giving incorrect result in total. I have used 3 different measure which I have written below

Measure 1 (getting week days)
Datediff =
VAR Start = MIN('Table'[DATE])
VAR End = MAX('Table'[END_DATE])
RETURN DATEDIFF(Start,End,DAY)+1

 

Measure 2

%sum = SUM('Table'[sum])/CALCULATE(SUM('Table'[sum]]),ALLSELECTED())

 

Measure 3
Final=
Var A= 300000/Last day of the month 
Var B= A*( Datediff)
Var C =A*B
Var D= C*(%sum)
return D
I want to show  Final measure in matrix visual agianst month, week and category dimension. Row wise data is showing correctly but at total showing incorrect data.

 

I

I want answer to be 2032819+544684=2577503 for

Any help would be appreciated.

Thank you in advance.

  • Uzi2019 , Try to use something like below:

    IF(HASONEFILTER('Table'[Month]),C*(%Sum),SUMX(VALUES('Table'[Month]),C*(%Sum)))
     
    Hopefully it may help you out.
     

8 Replies