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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
VitoMas
Frequent Visitor

Count the number of customers that ordered a certain product

I would like to know the amount of customers ordered a certain product or product category.

This is the table i got now.

Product CategorySalesMarginOrder Quantity
Accessories1.272.057938.84961.931
Bikes94.620.52655.769.11590.220
Clothing2.117.6141.619.74273.598
Components11.799.0767.509.94249.027
Total109.809.27465.837.650274.776

 

I would like to perform this measure with DAX and i got the product category id, subcategory id and a customer id to work with. 

 

The desired output would be something like this.

 

Product CategorySalesMarginOrder Quantity#Customers that bought this product
Accessories1.272.057938.84961.931147
Bikes94.620.52655.769.11590.220785
Clothing2.117.6141.619.74273.59854
Components11.799.0767.509.94249.027258
Total109.809.27465.837.650274.7761244

 

If you need any more information feel free to ask me. I'm a beginner in DAX so i could be forgetting some crucial things.

 

Thanks in advance!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@VitoMas 

Would bringing the customer ID to ur table and changing it as a count help for this?

View solution in original post

3 REPLIES 3
tangutoori
Helper III
Helper III

proivde customers table info.

 

v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @VitoMas,

Have you solved your problem based on the suggestion of Akshaya?

If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

If you still need help, please share your data sample of Customer so that I could understand your scenario better and help further on it.

Best  Regards,

Cherry

 

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

@VitoMas 

Would bringing the customer ID to ur table and changing it as a count help for this?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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