Forum Discussion
TestTest17891
Advocate I
2 years agoCreate a DAX expression to count the non-blank rows in a table based on a specific condition
How can I formulate a DAX expression that filters a table based on conditions in two different columns and then counts the remaining rows in Power BI ?
measure = CALCULATE (
COUNTROWS( df )
,df[column1] IN { "col1", "col2", "col2" }
&&df[column2] <> 0
)
Try the following :
measure = CALCULATE ( COUNTROWS( df ) ,df[column1] IN { "col1", "col2", "col2" } && VALUE(df[column2]) <> 0 )
1 Reply
- AmiraBedh
Super User
Try the following :
measure = CALCULATE ( COUNTROWS( df ) ,df[column1] IN { "col1", "col2", "col2" } && VALUE(df[column2]) <> 0 )