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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Power BI Header Change

Power BI Header Update

Read about the exciting updates for the Power BI forum.