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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have two tables with one to many relationship:
Table1: Sales:
| Sales Id | Customer Id |
| 9001 | A |
| 9002 | B |
| 9003 | B |
| 9004 | A |
| 9005 | D |
| 9006 | E |
Table2: Sales details:
| Sales Id | Campaign Id |
| 9001 | C1 |
| 9001 | C8 |
| 9002 | C3 |
| 9002 | C10 |
| 9002 | C11 |
| 9003 | C40 |
| 9004 | C1 |
| 9004 | C18 |
| 9005 | C3 |
| 9006 | C6 |
| 9006 | C6 |
| 9006 | C10 |
You should know that the column "Customer_Id" has blanks.
I want to calculate how many purchases a customer did by campaign. Any thoughts?
Thanks on advanced
Solved! Go to Solution.
Hello: Here is the avg campaings/known customer. I hope this is what you are looking for.
https://drive.google.com/file/d/1VtPEjBK70Msz5hQcBtKZU4X9bl-eSQcT/view?usp=sharing
Hello: Here is the avg campaings/known customer. I hope this is what you are looking for.
https://drive.google.com/file/d/1VtPEjBK70Msz5hQcBtKZU4X9bl-eSQcT/view?usp=sharing
Thank you for your reply.
This is exactly what I'm after but I face a problem. The column "Customer ID" has blanks. I tried to replace "VALUES" with "DISTINCT" and "ALLNOBLANKROW" but it didn't solve it. Do you have any suggestion about this?
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 9 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 19 | |
| 17 | |
| 11 |