Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello people,
I have a table that shows invoice number and every item purchased by the cutomer. See sample table below.
I would like to create a column or measurement that shows me count of items per invoice number.
I have another table that has unique invoice numbers
Thank you!
Invoice number | Item sold |
1001 | Water |
1001 | Bread |
1001 | Coke |
1002 | Banana |
1003 | Pears |
1003 | Apple |
1004 | Tylenol |
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
count items: =
COUNTROWS( DISTINCT( Sales[Item sold]) )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
The measure can be as simple as =DISTINCTCOUNT(Data[Items sold]). Create a relationship (Many to One and Single) from the Invoice column of the Data table to the Invoice column of the Invoice table. To your visual, drag Invoice number from the Invoice table.
Thank you Ashish!
Hi,
Please check the below picture and the attached pbix file.
count items: =
COUNTROWS( DISTINCT( Sales[Item sold]) )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Thank you Jihwan_Kim
User | Count |
---|---|
141 | |
113 | |
104 | |
78 | |
64 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |