The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi everyone,
I need help in the following situation,
Data available - Customer ID (not unique values) , Reporting period - (either "Prior Period" or "Current Period")
(One customer ID can have both Prior Period and Current Period)
I need a 3rd column which is Type of Customer -
1) If customer ID is available in Prior Period and Current Period then it is "Recurring Customer"
2) If customer ID is available in Prior Period and not in Current Period then it is "Removed Customer"
3) If customer ID is available in not Prior Period and in Current Period then it is "New Customer"
I need to calculate this column using Dax, Kindly help.
https://www.daxpatterns.com/new-and-returning-customers/
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
Hi,
I can do that but can you tell me what you need ? What is not working ?
Having a view of your model might help as well.
I tried this, but the values I am getting is New customer and blanks, could you kindly help me in understanding what went wrong here ?
Can you check your variable prevPeriod, because I think you're not getting anything from it.
Hi,
In case you haven't read that beautiful article from SQLBI, you should. It will answer your exact question 🙂
https://www.sqlbi.com/articles/computing-new-customers-in-dax/
Have a nice day and do not hesitate to share your solution.
Thankyou for the reply,
It seems like similar to my query, but could you help me in writing the DAX for my case ?