Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I need a little help. I have a DAX Measure that counts the number of unique vendors:
Category | Year | Vendor | DISTINCT (have) | DISTINCT TOT (need) |
A | 2018 | ABC | 1 | 2 |
A | 2019 | DEF | 1 | 2 |
A | 2020 | DEF | 1 | 2 |
Total | 2 | 2 |
Thank you in advance!
Solved! Go to Solution.
This may be overkill, but it works:
Thank you! That gave me the total for ALL vendors in my table, not vendors related to each category. I think I need to do something with ALLSELECTED for the years given for the current category.
Ah, okay! I misunderstood your requirement. You could use ALLEXCEPT and then put the column name in that you want it to still filter by. So,
CALCULATE(DISTINCTCOUNT(TABLE[Vendor ID]),ALLEXCEPT(TABLE,TABLE[Vendor ID]))
This may be overkill, but it works:
You can use the calculate function in combination with the ALL function. So,
CALCULATE(DISTINCTCOUNT(TABLE[Vendor ID]),ALL(TABLE))
Please mark as a solution if this works for you!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
86 | |
85 | |
68 | |
67 | |
63 |
User | Count |
---|---|
210 | |
118 | |
116 | |
81 | |
74 |