Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Counting a distinct value in multiple columns

Hello PBI community! I was wondering how I can count a distinct value on multiples column at the same time. As In the example below, I need a measure to count how many zeros (total) there are on colu...
  • deevaker's avatar
    3 years ago

    Not sure if i missed to understand, but if you need to add all the count of zeros, you can write this 

    Measure =
    CALCULATE(Count('Table'[Column1]),'Table'[Column1]=0)+
    CALCULATE(Count('Table'[Column2]),'Table'[Column2]=0)+
    CALCULATE(Count('Table'[Column3]),'Table'[Column3]=0)

    below is the screenshot for reference