Saturday, April 29, 2017

CASE WHEN with between function in DAX


I used this nested IF function to create a new column based on the Sum Rain mm column.

Column = IF('Weather daily'[Sum Rain mm]<=3,"Dry" ,IF('Weather daily'[Sum Rain mm] > 3 && 'Weather daily'[Sum Rain mm] <= 1,"Rainy Day",IF('Weather daily'[Sum Rain mm]> 10 && 'Weather daily'[Sum Rain mm] <= 50,"Wet Day", IF('Weather daily'[Sum Rain mm] >= 50,"Heavy Rain") )))