Looking at the image below, I have a negative number (in the red box) which refers to how many hours over 9 hours I have worked on that particular day and is formatted as DURATION. Below the day of the week for that column is how many hours I will be paid for which is also set as DURATION.
I have tried various ways of only showing the column I mentioned first ONLY if its a positive duration but I'm having no luck at all.
The formula I'm using is ([Paid Hours]-"9") which is very basic. I've tried a show if using the formula in the second image below but it gives an error.
Any suggestions?
Solved! Go to Solution.
@Simon_Blackburn wrote:
The formula I'm using is ([Paid Hours]-"9")
IFS(
("009:00:00" < [Paid Hours]),
([Paid hours] - "009:00:00")
)
Write in the ShowIf property:
IF(
[duration] >= 0, true, false
)
Another option is to calculate the value of paid hours based on a check, for example, if duration is less than zero then set it to zero, otherwise set it to the duration value.
You can create an expression like this:
IF(
[PaidHours] - 9 < 0, 0,
[PaidHours] - 9
)
This is the only way I can get the formula to correct but it doesn't do anything at all to the negative number, it remains.
I get the following error:
IF function is used incorrectly:the second input (value-if-true) and third input (value-if-false) should have the same type.
@Simon_Blackburn wrote:
The formula I'm using is ([Paid Hours]-"9")
IFS(
("009:00:00" < [Paid Hours]),
([Paid hours] - "009:00:00")
)
Thanks @Steve
Perfect. Thank you @Steve and also thank you @Gustavo_Eduardo for trying and educating me.
I'm learning too, my friend! Some expressions that I don't use frequently, for example this one, are good to learn. Greetings
User | Count |
---|---|
17 | |
12 | |
9 | |
4 | |
4 |