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.
Hello,
I'm trying to count the distinct values in a column with filters without using CALCULATE because I am using a Direct Query.
So far I have COUNTROWS(FILTER(Table, Table[A] = "1")) which counts every row with the filter condition but I'm not sure how to make it filter only on the distinct values in a given column as well.
Solved! Go to Solution.
@RYU209
Please try
=
COUNTROWS (
DISTINCT (
SELECTCOLUMNS (
FILTER (
'Table',
'Table'[A] = "1"
),
"@B", 'Table'[B]
)
)
)
@RYU209
Please try
=
COUNTROWS (
DISTINCT (
SELECTCOLUMNS (
FILTER (
'Table',
'Table'[A] = "1"
),
"@B", 'Table'[B]
)
)
)
That worked perfectly. Thank you!
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
12 | |
11 | |
8 | |
6 |