Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Incorrect Total for one Column

Hi all, I have been trying to create a table but the total for the measure on my table is wrong. Sales 1 comes directly from data while I created a measure for Sales 2. I believe that is the reason why the total is wrong but I cannot seem to find a way to solve it. The table and my DAX code for measure is down below. If someone can show me how to fix the total I would appreciate it. Thanks in advance!

Sales 2 =
Var LastYear=MAX('Sales'[Year])
Return

CALCULATE(SUMX('Sales', 'Sales'[Sales]),'Sales'[Year]=LastYear)

 

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous,

    Can you please share a pbix or some dummy data that keep raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

    How to Get Your Question Answered Quickly  

    Regards,

    Xiaoxin Sheng