Forum Discussion
WJ876400
3 years agoHelper IV
Multiple If statement
Hi I want to create the below table. I have created the date difference column but only want a number to appear under certain conditions. - End date Status Date difference 01/12/2022 ...
- 3 years ago
Hi,
Please check the below picture and the attached pbix file.
It is for creating a new column.
Date diff CC = VAR _today = TODAY () RETURN SWITCH ( TRUE (), Data[End date] < _today && Data[Status] = "Pause", BLANK (), Data[End date] < _today && Data[Status] = "Finished", BLANK (), Data[End date] > _today, BLANK (), Data[End date] < _today && Data[Status] = "Live", DATEDIFF ( Data[End date], _today, DAY ) )
Jihwan_Kim
3 years agoSuper User
Hi,
Please check the below picture and the attached pbix file.
It is for creating a new column.
Date diff CC =
VAR _today =
TODAY ()
RETURN
SWITCH (
TRUE (),
Data[End date] < _today
&& Data[Status] = "Pause", BLANK (),
Data[End date] < _today
&& Data[Status] = "Finished", BLANK (),
Data[End date] > _today, BLANK (),
Data[End date] < _today
&& Data[Status] = "Live", DATEDIFF ( Data[End date], _today, DAY )
)