Forum Discussion

Cramos's avatar
Cramos
Frequent Visitor
9 years ago
Solved

Sum Total vs a single value

Hi,   I'm stuck with something very silly but I'cant find the solution.   I have the sales for the month and a target for each month.    Something like this:   Table 1   MONTH Target ...
  • hohlick's avatar
    hohlick
    9 years ago

    Your tables have to be linked someway, for example, by month (Table1 to Table 2, 1 to many)

     

    Then a new measure:

    Sales diff = CALCULATE(SUM('Table 2'[Sales]))-CALCULATE(SUM('Table 1'[Target]))

     

    Then you'll get desired amount for all months or for selected month only.

    For example, if you make a bar chart visual with month number as x-axis, and put this measure in the values, you'll get what you want