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?
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)
)
User | Count |
---|---|
41 | |
36 | |
30 | |
23 | |
16 |