(See visual) I'm looking for a DAX expression that can be used to make the values in my "Shift" column dependent on the values in my "Time" column. Exact or similar to the SQL case statement script below. I am relatively new to DAX and the same logic doesn't seem to work in Power BI. I've tried looking around for a solution and can't seem to find anything that matches exactly what I'm looking for.
CASE WHEN CONVERT(VARCHAR(8), si.dtincidentdate, 108) BETWEEN '07:00:00' AND '14:59:00' THEN 'Day' WHEN CONVERT(VARCHAR(8), si.dtincidentdate, 108) BETWEEN '15:00:00' AND '22:59:00' THEN 'Evening' ELSE 'Night'
END AS ShiftName
Thanks in advance!
Aucun commentaire:
Enregistrer un commentaire