Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!