Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Client Purchase Frequency

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 IDCreation Date
101/01/2021
201/02/2021
301/03/2021


Sales:

Sales ID      Client     IDDate
1101/04/2021
2201/04/2021
3201/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

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@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()))

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@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()))

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

Thank you very much.

It worked perfectly!

Cheers,

Simão

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.