Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi, I have been posting this same problem but could not solve it yet.
I attached my demo power bi file in the googld doc link.
So, I need to get customer who meets at least one of the 3 conditions below.
Let's say our company is doosan.
case 1. customer purchased from apple within last 24 months but did not purchased any other companies' products for 24 months.
case 2. customer bought apple 3 years ago but did not make any purchases from other companies.
case 3. customer bought apple first 3 years but did not make any purchases from other companies.
| 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | |
| Customer 1 | x | x | x | x | Doosan | x |
Customer 2 | x | x | x | x | x | Doosan |
| Customer 3 | x | x | Doosan | x | x | x |
| Customer 4 | cat | Cat | cat | doosan | x | x |
| Customer 5 | x | doosan | doosan | doosan | cat | doosan |
| Customer 6 | doosan | doosan | doosan | x | x | x |
| Customer 7 | x | x | cat | doosan | doosan | doosan |
| Customer 8 | x | x | x | doosan | doosan | x |
Customer 1, 2, 3, 4, 6, 7, 8 are retained customer and 5 is not because customer bought microsoft product on 2019.
But if I make table that is filtered on year 2015, customer 5 is retained and if customer 5 bought microsoft on 4/1/2019, then customer should be marked as a retained customer before 4/1/2019.
If any of apple customer bought other companies' product also cannot be a retained customer.
I have calculated some measures to get those cases.
@Anonymous - Chapter 6, recipes 2 and 3 deal with customer KPI's around new, returning, retained, lost customers.
https://github.com/gdeckler/DAXCookbook
Hey, Thank you so much for reply. But I try to apply on my pbi but it took so long time to visualize...
@Anonymous - Difficult to say. I have some blog articles around DAX performance tuning.
https://community.powerbi.com/t5/Community-Blog/Performance-Tuning-DAX-Part-1/ba-p/976275
https://community.powerbi.com/t5/Community-Blog/Performance-Tuning-DAX-Part-2/ba-p/976813
Also, @marcorusso has some patterns on daxpatterns.com for this sort of stuff as well. Should have mentioned those initially.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 38 | |
| 38 | |
| 28 | |
| 25 |
| User | Count |
|---|---|
| 124 | |
| 87 | |
| 70 | |
| 66 | |
| 65 |