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'm looking to get a count of customers who have shopped in the last 13 months, and also shopped in the prior 13 months.
I have a fact table [orders], date table [dates] and customer table [customers].
Order table is linked to customer table by column [email] which is to be used for the count. Order table is also linked to dates table through [FiscalDay] column.
I can get the count of the last 13 months to work, but can't see a count of customers who shopped in BOTH periods.
Thanks
Mike
Solved! Go to Solution.
Hi @Anonymous,
>>I can get the count of the last 13 months to work, but can't see a count of customers who shopped in BOTH periods.
Maybe you can try to following my logic:
1. Create variable to store customer list shopped in last 13 months.
2. Create variable to store customer list who shopped between last 26 months and last 13 months.
3. Use INTERSECT function to get customers who both shopped in two periods.
4. Count above intersect list.
If you have confused on coding formula, please share some sample data to help us clarify your table structure and test to coding formula.
Regards,
Xiaoxin Sheng
Hi @Anonymous,
>>I can get the count of the last 13 months to work, but can't see a count of customers who shopped in BOTH periods.
Maybe you can try to following my logic:
1. Create variable to store customer list shopped in last 13 months.
2. Create variable to store customer list who shopped between last 26 months and last 13 months.
3. Use INTERSECT function to get customers who both shopped in two periods.
4. Count above intersect list.
If you have confused on coding formula, please share some sample data to help us clarify your table structure and test to coding formula.
Regards,
Xiaoxin Sheng
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 67 | |
| 62 |