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'm struggeling to get the following measure.
My data is from multiple (related) tables:
Table1.Contractnumber | Table2.Customernumber | Table3.Productcategory | Table3.ProductVolume |
A | 1 | X | 10kg |
A | 1 | Y | 100kg |
A | 1 | Z | 50kg |
B | 1 | X | 10kg |
B | 1 | Y | 10kg |
B | 1 | Z | 50kg |
C | 2 | X | 100kg |
C | 2 | X | 100kg |
C | 2 | X | 50kg |
What function should I use to create a distinct count of the productvolume per contract, customer and productype like:
Contractnumber | Customernumber | ProductCategory | Number of distinct productvolumes |
A | 1 | X | 1 |
A | 1 | Y | 1 |
A | 1 | Z | 1 |
B | 1 | X | 1 |
B | 1 | Y | 1 |
B | 1 | Z | 1 |
C | 2 | X | 2 |
Could anyone please point me into the right direction in terms of which DAX functions to use for this?
Hi @Snoek ,
Try this:
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
Test = CALCULATE(DISTINCTCOUNT('Table'[Table3.ProductVolume]),FILTER(ALLEXCEPT('Table','Table'[Table1.Contractnumber],'Table'[Table2.Customernumber],'Table'[Table3.Productcategory]),('Table'[Table3.ProductVolume] = 'Table'[Table3.ProductVolume])))
Proud to be a Super User!
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 |
---|---|
39 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
44 | |
32 | |
30 | |
18 | |
17 |