Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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
)
Solved! Go to Solution.
Try the following :
measure = CALCULATE (
COUNTROWS( df )
,df[column1] IN { "col1", "col2", "col2" }
&& VALUE(df[column2]) <> 0
)
Try the following :
measure = CALCULATE (
COUNTROWS( df )
,df[column1] IN { "col1", "col2", "col2" }
&& VALUE(df[column2]) <> 0
)
User | Count |
---|---|
77 | |
74 | |
60 | |
60 | |
46 |
User | Count |
---|---|
109 | |
95 | |
86 | |
79 | |
61 |