Help with if logic expression

Hi,

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

Solved Solved
0 12 343
1 ACCEPTED SOLUTION

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

View solution in original post

12 REPLIES 12

This?

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.

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:

3X_3_5_3510c41dfdf4677710d0c1286a89e80ae30ac074.jpeg

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.

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).

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

Top Labels in this Space