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 127
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