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?
- 7 years ago
Anonymous try this, add following as a measure
My Measure = DIVIDE ( CALCULATE( COUNTROWS( TableA ), TableA[Column] = "Yes" ), CALCULATE( COUNTROWS( TableB ), TableB[Column] = "Total" ) )
parry2k
7 years agoSuper User
Anonymous try this, add following as a measure
My Measure = DIVIDE ( CALCULATE( COUNTROWS( TableA ), TableA[Column] = "Yes" ), CALCULATE( COUNTROWS( TableB ), TableB[Column] = "Total" ) )
Anonymous
7 years agoNot applicable
Parry,
Thanks so much. Being new to DAX, i keep wanting to write in Excel code or other code language.
This works perfectly!