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