I want to add a calculated column that sets the very first transaction for a specific customer as a new sale and any subsequent transactions as upgrades. Below is a snap shot of my sales table,
I want to be able to filter out upgrades or new sales. I have tried to use the FIRSTDATE() and MIN() functions to try and create a conditional column and failed each time. Is there a way i can add a conditional column that sets all first transactions as new sale and every other trasaction as an upgrade???
I have also tried using this measure;
New_sale = var NewSale=CALCULATE(MIN('SALES'[sale_date]),ALLEXCEPT(SALES,'SALES'[Customer_id])) return CALCULATE(COUNTROWS('SALES'),FILTER('SALES','SALES'[sale_date]<=NewSale))
It doesn't work for me because i cant use it to filter.