The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi dear community,
I have a problem here and would love your help.
I have two tables. A customer table and a sales table.
Ex Customer:
Clinet ID | Creation Date |
1 | 01/01/2021 |
2 | 01/02/2021 |
3 | 01/03/2021 |
Sales:
Sales ID | Client ID | Date |
1 | 1 | 01/04/2021 |
2 | 2 | 01/04/2021 |
3 | 2 | 01/04/2021 |
Pretended result: Barchart with two filters: client creation date and sale date
customers without purchases: 1
customers with 1 purchase: 1
customers with 2 or more purchases: 1
Thank you very much,
Simao
Solved! Go to Solution.
@Anonymous , Create measures like
Total sales = Count(Sales[Sales ID])
No purchase = countx(values(Customer[client ID]) , if(isblank([Total Sales]),[client ID],blank()))
1 purchase = countx(values(Customer[client ID]) , if([Total Sales]=1,[client ID],blank()))
2 or more purchase = countx(values(Customer[client ID]) , if([Total Sales]>=2,[client ID],blank()))
@Anonymous , Create measures like
Total sales = Count(Sales[Sales ID])
No purchase = countx(values(Customer[client ID]) , if(isblank([Total Sales]),[client ID],blank()))
1 purchase = countx(values(Customer[client ID]) , if([Total Sales]=1,[client ID],blank()))
2 or more purchase = countx(values(Customer[client ID]) , if([Total Sales]>=2,[client ID],blank()))
Thank you very much.
It worked perfectly!
Cheers,
Simão
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
82 | |
77 | |
46 | |
39 |
User | Count |
---|---|
137 | |
108 | |
69 | |
64 | |
53 |