Forum Discussion
PetarRog
4 years agoNew Member
Need to transfer sum case when from SQL to DAX
Hello, Can you help me to transfer the following statement to power BI from SQL (Google data studio) Sum(case when CONTAINS_TEXT(Status,"Done") then 1 else 0 end)/sum (case when Status is n...
- Anonymous4 years ago
Hi i belive this could be what you are looking for;
Dax =
DIVIDE (
CALCULATE ( COUNTROWS ( 'Table' ), CONTAINSSTRING ( 'Table'[status], "Done" ) ),
CALCULATE ( COUNTROWS ( 'Table' ), 'Table'[status] <> BLANK () ),
BLANK ()
)
Anonymous
4 years agoNot applicable
Hi i belive this could be what you are looking for;
Dax =
DIVIDE (
CALCULATE ( COUNTROWS ( 'Table' ), CONTAINSSTRING ( 'Table'[status], "Done" ) ),
CALCULATE ( COUNTROWS ( 'Table' ), 'Table'[status] <> BLANK () ),
BLANK ()
)