Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Calculate Sales from start date

Need to calculate sales of a shop from start date of a shop.
I have 2 tables : Sales and Date
In Sales table I have information about volume of sales.
In Date table I have shop start date.
I have tried to use that code:

 

SWS comp = 
CALCULATE(Sales[sales], [Start Date] >= [Start Date])​

 

  • devanshi's avatar
    devanshi
    3 years ago

    Try this once,

    CALCULATE(SUM([Sales]), ALL(Tablename), [Startdate]>=MIN([Startdate]))

5 Replies

  • Total Sales = 
    VAR startdate = FIRSTDATE([Startdate])
    CALCULATE(SUM([Sales]) , [Startdate] >= startdate)

    • Anonymous's avatar
      Anonymous
      Not applicable

      There is an issue with syntax

      • devanshi's avatar
        devanshi
        Icon for Helper V rankHelper V

        Try this once,

        CALCULATE(SUM([Sales]), ALL(Tablename), [Startdate]>=MIN([Startdate]))