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! It's time to submit your entry. Live now!
HI Everyone
I cant seem to find a solution for this or rather how i could solve this using DAX.
So I have a table like this below.
How do I count the number of dogs based on he unique ID and would basically just result to 1.
so for ID 1 even though the dog kind appeared as 2 it should still count as 1 because of the unique ID.
Im sure its simple but i just dont know how to approach it with DAX. Thanks a lot in advance.
Solved! Go to Solution.
You can use an expression like this
Dogs = CALCULATE(DISTINCTCOUNT(Table[ID]), Table[Kind] = "Dog")
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
@Anonymous , this will make sure it is correct for all kind
countx(summarize(Table[ID], Table[Kind]),[ID])
Only for dog'calculate(distinctCOUNT(Table[ID]),Table[Kind] = "dog")
You can use an expression like this
Dogs = CALCULATE(DISTINCTCOUNT(Table[ID]), Table[Kind] = "Dog")
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
thanks for quick reply I knew it was this simple
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 44 | |
| 31 | |
| 25 | |
| 23 |
| User | Count |
|---|---|
| 136 | |
| 115 | |
| 58 | |
| 39 | |
| 35 |