Help with if logic expression


I have a column which calculates duration,

In another column I need to put if expression where if duration more than 4 hrs, I need it to return 1 else 0.5

Pls help @Aleksi @Suvrutt_Gurjar


IF(TOTALHOURS([DurationColumn])>4, 1, 0.5)


Not working…when duration is less than 4 hrs I am getting 1 instead of 0.5…which is not correct

The suggested expression does that.

Should not.

You might need to share the screen shoot.

1 Like

If u see here the Duty time column is less than 4 hrs in total …hence I must get 0.5 in the count column…instead I am getting 1

Hmmm to be sure, could you place your mouse on the number “1” and check if you click this:


1 Like

It’s showing 1.0

Please provide the snapshot of the expression, and also screen shoot of the detail view of that row from the emulator editor.

1 Like

I don’t mind using a expression in google sheet instead on Appsheet

The [Count] column is not appearing in the detail view, I suggest you edit the record in a form and save it to the sheet. Let see if the record showing correctly (though in my opinion, you will need an action for this kind of requirement). However, first, lets edit the record in the form and save it (include the column in the slice also).

1 Like

Still showing 1 instead of 0.5

Ah… You need to change the column type of the “Count” column. it should be decimal column type with decimal digit of 2.


At last …Breakthrough…Thanks @Heru

Getting right results now