Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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 not null then 1 else 0 end)
Both columns are strings not numbers.
Thanks in advance!
Solved! Go to Solution.
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 ()
)
Thanks, I was using column instead of measure
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 ()
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 65 | |
| 43 | |
| 41 | |
| 33 | |
| 23 |
| User | Count |
|---|---|
| 199 | |
| 124 | |
| 104 | |
| 74 | |
| 55 |