Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hey guys,
I'm struggling to find a DAX based solution to this problem I'm having, this is the table I have:
How would I count the number of distinct values within column 2, grouping within the ID in the first column?
The count should look something like this:
Thanks for the help!
George
Solved! Go to Solution.
Hi @Mansfig2 ,
You can create a calculated column as below:
CountDistinct =
CALCULATE (
DISTINCTCOUNT ( 'Table'[ID2] ),
FILTER ( 'Table', 'Table'[ID1] = EARLIER ( 'Table'[ID1] ) )
)
Best Regards
Hi @Mansfig2 ,
You can create a calculated column as below:
CountDistinct =
CALCULATE (
DISTINCTCOUNT ( 'Table'[ID2] ),
FILTER ( 'Table', 'Table'[ID1] = EARLIER ( 'Table'[ID1] ) )
)
Best Regards
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
6 | |
6 | |
3 | |
2 | |
2 |
User | Count |
---|---|
5 | |
5 | |
4 | |
4 | |
3 |