Combine two IFS Formula

Good day!

I am having virtual column decimal type that calculates duration in days.

Ifs([Status] =โ€œOpenโ€, TotalHours(Today() -[_Thisrow]. [Date Due]) /24) this formula works fine.

But I want to combine with this formula

Ifs([Status] =โ€œClosedโ€, Totalhours([_thisrow]. [Date Return] - [Due Date]) /24)

Any suggestions how to Combine this 2 formula?

0 2 133
2 REPLIES 2

Steve
Platinum 4
Platinum 4

You can have the other condition and value as 3rd and 4rth parameter.

Ifs(
	[Status] =โ€œOpenโ€, 
	TotalHours(Today() -[_Thisrow]. [Date Due]) /24,
	[Status] =โ€œClosedโ€, 
	Totalhours([_thisrow]. [Date Return] - [Due Date]) /24
)

Iโ€™d normally use a switch in these situations

SWITCH(
  [Status],
  โ€œOpenโ€, TotalHours(Today() -[_Thisrow]. [Date Due]) /24),
  โ€œClosedโ€, TotalHours(Today() -[_Thisrow]. [Date Due]) /24)
)
Top Labels in this Space