The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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?
User | Count |
---|---|
25 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
28 | |
13 | |
12 | |
12 | |
6 |