Forum Discussion

DarSz's avatar
DarSz
Helper I
5 years ago
Solved

Distinctcount based on another column

Hello, I need help with a measure. I have following table:

idvalue
1true
1false positive
1false
2false positive
2false
2false
3true
3true
3true

I need to count how many Id's has at least one true in column Value. In my example the answer is 2 (Id 1 = 1 true, Id 2 = 0 true, Id 3 = 3 true). Can anybody help me with this task?

  • How many ids measure :=
    COUNTROWS(
          SUMMARIZE(
              FILTER('Table', 'Table'[value] = "true"),
                    'Table'[id])
    )

1 Reply

  • How many ids measure :=
    COUNTROWS(
          SUMMARIZE(
              FILTER('Table', 'Table'[value] = "true"),
                    'Table'[id])
    )