cancel
Showing results for
Did you mean:
Helper I

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 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

1 ACCEPTED SOLUTION
Super User

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

Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!
!! Subscribe to my youtube Channel !!
2 REPLIES 2
Super User

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

Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!
!! Subscribe to my youtube Channel !!
Helper I

Thank you very much.

It worked perfectly!

Cheers,

Simão

Announcements

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.