March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
15 | |
12 | |
9 | |
8 |
User | Count |
---|---|
41 | |
32 | |
29 | |
12 | |
12 |