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.
i have some data and i want to show in graph form to show the number of customers and how many different products they have purchased
example data below
ID | Product Purchased |
1 | A |
2 | A |
2 | B |
3 | A |
3 | B |
3 | C |
4 | A |
5 | B |
5 | C |
|
|
Results | 2 bought 1 product |
| 2 bought 2 products |
| 1 bought 3 products |
thanks
Solved! Go to Solution.
Try this calculated TABLE
From the Modelling Tab>>>NEW TABLE
Table = SUMMARIZE ( SUMMARIZE ( TableName, TableName[ID], "No of Products", DISTINCTCOUNT ( TableName[Product Purchased] ) ), [No of Products], "No of Customer", DISTINCTCOUNT ( TableName[ID] ) )
Hi @UM4R,
You can use either DISTINCTCOUNT formula to calculate distinct products bought per customers or the quick measure COUNT (Distinct) by clicking on the arrow after drop the field on "Value".
If I understood what you wanna show, it's a dynamic segmentation, Marco Russo and Alberto Ferrari have a article about it:
https://www.daxpatterns.com/dynamic-segmentation/
Thanks,
Ricardo
Try this calculated TABLE
From the Modelling Tab>>>NEW TABLE
Table = SUMMARIZE ( SUMMARIZE ( TableName, TableName[ID], "No of Products", DISTINCTCOUNT ( TableName[Product Purchased] ) ), [No of Products], "No of Customer", DISTINCTCOUNT ( TableName[ID] ) )
thanks @Zubair_Muhammad it has seemed to have done the trick
@ricardocamargos thanks for the link, it has a lot of useful information will look in more detail when i have some free time
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
96 | |
77 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |