Forum Discussion
First Acquisition Date
Dear Community,
I would like to make a cohort analysis for our customers by first acquisition date. In other words I need to calculate the first acquisition date (date of first order) per customer and group the customers by year of first acquisition.
Any ideas how to calculate in DAX?
attached an example from Tableau :)
Thanks
Riyadh
Hi Ergonaut ,
Could you please show us the error message in screenshot for further analysis?
Note that the formulas above are used in calculated column instead of measure.
Best Regards,
Amy
3 Replies
- v-xicaiCommunity Support
Hi Ergonaut ,
You can create columns like DAX below.
First Acquisition Date= CALCULATE(MIN(Table1[acquisition date]),FILTER(ALLSELECTED(Table1),Table1[Customer]=EARLIER(Table1[Customer])&&Table1[Market]=EARLIER(Table1[Market]))) Year of Customer Acquisition = YEAR(Table1[First acquisition date])
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- ErgonautNew Member
Hi Amy,
thanks for your prompt replay :). starting from ..EARLIER( I am getting a synthax error
Best
Riyadh