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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |