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.
@S_Coimbra , 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()))
@S_Coimbra , 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
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!
User | Count |
---|---|
386 | |
104 | |
67 | |
54 | |
49 |
User | Count |
---|---|
378 | |
118 | |
82 | |
67 | |
54 |