Forum Discussion

PowerRocky12's avatar
PowerRocky12
Helper I
4 years ago
Solved

Customer Status Calculation

I finally found a Dax calculation to create a column that gives me new, renewed, re-activated status for each customer.  New: First Customer Purchase (Stays in status for entire FY) Renewed: Custom...
  • DataInsights's avatar
    4 years ago

    PowerRocky12,

     

    It's recommended to use a variable instead of the EARLIER function.

     

    https://dax.guide/earlier/ 

     

     

    Also, for the variable first_date, you could create a separate table (using DAX or M) that has two columns: Customer ID, and First Date. Create a relationship between this table and the fact table, and use the RELATED function to retrieve First Date. This should be faster than calculating First Date for each row in the fact table.