Forum Discussion

markmess77's avatar
markmess77
Resolver I
6 years ago
Solved

Dax filtered value issue

I have a column that consists of simple Yes/No values. I have the below DAX that works perfectly fine for finding the count of Yes values. However, I also need to return a value of zero for all values of No in the column. I've looked into the If and Switch functions, but I can't seem to get them to work. Is there an easy way to get this result?

 

 

Test = 
CALCULATE(
	COUNTA('Table'[Column? ]),
	'Table'[Column] IN { "Yes" }
)

 

 

  • You can create a column like this and then have sum

    new Column = if([Column] IN { "Yes" },1,0)

     

    measure =sumx(Table, if([Column] IN { "Yes" },1,0))

     

    Or , use this option with your formula - Show item with no value

1 Reply

  • You can create a column like this and then have sum

    new Column = if([Column] IN { "Yes" },1,0)

     

    measure =sumx(Table, if([Column] IN { "Yes" },1,0))

     

    Or , use this option with your formula - Show item with no value