Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Amounts don't match up

Hello,

I have the following table visualization structure with 3 columns and measures:

PRODUCTCOLORAMOUNTAMOUNT_ALLAMOUNT_YELLOWTOTAL_YELLOWTOTAL_BLUE
ARED537.75628.50 2466.75
ABLUE66.75564.50 2466.75
AYELLOW3261.2532327.75
  636.50    

 

All my measures are off. For example TOTAL_YELLOW should give me 32 for all!

I am pretty new to DAX so I might be missing something:

AMOUNT_YELLOW = SUMX(FILTER(REPORT, REPORT[COLOR] = "YELLOW"), REPORT[AMOUNT])


TOTAL_YELLOW = CALCULATE(REPORT[AMOUNT_YELLOW], ALL(REPORT[COLOR]))

  • Anonymous's avatar
    Anonymous
    2 years ago

    It seems that using ALLSELECTED instead of ALL works!

    😀

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    It seems that using ALLSELECTED instead of ALL works!

    😀

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    Glad to hear that your issue has been resolved. Please mark your answer as a solution, it will help more people with the same problem.

     

    Best Regards,

    Neeko Tang