Forum Discussion
Anonymous
7 years agoNot applicable
DAX Formula
I am having a hard time figuring out how to write a countif formula in DAX.
=countif(table a, "Yes")/countif(tableb,Total)
so basically a % formula.. can anyone assist?
Anonymous try this, add following as a measure
My Measure = DIVIDE ( CALCULATE( COUNTROWS( TableA ), TableA[Column] = "Yes" ), CALCULATE( COUNTROWS( TableB ), TableB[Column] = "Total" ) )
2 Replies
- parry2kSuper User
Anonymous try this, add following as a measure
My Measure = DIVIDE ( CALCULATE( COUNTROWS( TableA ), TableA[Column] = "Yes" ), CALCULATE( COUNTROWS( TableB ), TableB[Column] = "Total" ) )
- AnonymousNot applicable
Parry,
Thanks so much. Being new to DAX, i keep wanting to write in Excel code or other code language.
This works perfectly!