cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lakshmi9228 Member
Member

Count of products

I have these products  I need to know, How many customers bought more than one product in a particular time period.

I need a filter , where i can select count of products such as 2, 3,4 etc 

At that time, I need to see the customers list. 

How can I get that, can someone help me out with this.     

 

For example, if I select count as 2, I need the customers list who had purchased any 2 products.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Count of products

Hi @lakshmi9228,

 

To get the count of products accroding to the filered result, we need to create a measure like this.

 

DYcount = CALCULATE(COUNTROWS('Product'),FILTER(ALLSELECTED('Product'),'Product'[name]=MAX('Product'[name])))

Then we can create a slicer and create another measure. And filter the table visual based on the Measure, make the result is 1.

 

Measure = IF([DYcount]=SELECTEDVALUE(Table1[Filter]),1,0)

Here is the result for your reference.

1.PNG

 

For more details, please check the pbix as attached.

https://www.dropbox.com/s/hpo56lrvwl570sv/Distinct%20Customer%20Purchases.pbix?dl=0

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

13 REPLIES 13
lakshmi9228 Member
Member

Re: Count of products

cellison Frequent Visitor
Frequent Visitor

Re: Count of products

Hi there, 

 

For this you need to use a Basket Analysis.. 

 

There is a nice writeup on this Here

 

 

lakshmi9228 Member
Member

Re: Count of products

It might help but it is not related to the solution I am looking for.
The below screenshot describes the way how I am looking for.Capture.PNG

lakshmi9228 Member
Member

Re: Count of products

Can someone please help me out

Community Support Team
Community Support Team

Re: Count of products

Hi @lakshmi9228,

 

Based on my test, we need to add a calculated column to your table to get the count of products.

 

Count = CALCULATE(DISTINCTCOUNT(Sales[Product]),FILTER(ALL(Sales),Sales[Customer]=EARLIER(Sales[Customer])))

 

Capture.PNG

For more details, please check the pbix as attached.

 

https://www.dropbox.com/s/wihx4i5bwuihkdd/Display%20Current%20and%20Previous%20Months.pbix?dl=0

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lakshmi9228 Member
Member

Re: Count of products

Hi Frank,

 

I tried using the below formulae, But I am not getting the exact customer list.
Please do let me know if there is any other way that I can go through it.

 

Community Support Team
Community Support Team

Re: Count of products

Hi @lakshmi9228,

 

I made another sample based on the data you shared here.

 

Firstly, we need create a calculated column using the formula as below.

 

Count = CALCULATE(DISTINCTCOUNT('Product'[Product]),FILTER(ALL('Product'),'Product'[name]=EARLIER('Product'[name])))

Then we can filter the table based on the calculated column.

 

1.PNG

 

For more details, please check the pbix as attached.

 

https://www.dropbox.com/s/hpo56lrvwl570sv/Distinct%20Customer%20Purchases.pbix?dl=0

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lakshmi9228 Member
Member

Re: Count of products

Hi Frank, 

Perfect, is there a way that I can apply filter on Orderdate and see the count of products according to the orders in a given time period.

Thanks,

Lakshmi

Community Support Team
Community Support Team

Re: Count of products

Hi @lakshmi9228,

 

To get the count of products accroding to the filered result, we need to create a measure like this.

 

DYcount = CALCULATE(COUNTROWS('Product'),FILTER(ALLSELECTED('Product'),'Product'[name]=MAX('Product'[name])))

Then we can create a slicer and create another measure. And filter the table visual based on the Measure, make the result is 1.

 

Measure = IF([DYcount]=SELECTEDVALUE(Table1[Filter]),1,0)

Here is the result for your reference.

1.PNG

 

For more details, please check the pbix as attached.

https://www.dropbox.com/s/hpo56lrvwl570sv/Distinct%20Customer%20Purchases.pbix?dl=0

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 427 members 4,354 guests
Please welcome our newest community members: