Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Calculate Sales first year, second year etc.

Hello everyone,   Can someone help me with the dax-formulas to calculate the sales in the first, second year and so on?     The table: Invoicedate Invoicenumber Customernumber  Amou...
  • v-chuncz-msft's avatar
    8 years ago

    Anonymous,

     

    You may use DAX below to add a calculated column.

    Column =
    Table1[Year]
        - MINX (
            FILTER ( Table1, Table1[Customernumber] = EARLIER ( Table1[Customernumber] ) ),
            Table1[Year]
        )
        + 1