Forum Discussion
IF statement maybe?
- 9 years ago
Hi tmears
From my point of view ...
if you know and can assign to each customer a range hour.
Let's say all the customers that end their hours at 17:00 could be assigned 'Type A', and all those that end their hours at 18:00 could be assigned 'Type B'
Then you could use ....
FirstDayEndTime =
IF(
Customers[Type] = "Type A",
DATE ( YEAR ( incident[createdon] ), MONTH ( incident[createdon] ), DAY ( incident[createdon] ) )
& " 17:00:00",
DATE ( YEAR ( incident[createdon] ), MONTH ( incident[createdon] ), DAY ( incident[createdon] ) )
& " 18:00:00"
)
Hope That Helps
Vicente - 9 years ago
Hi tmears,
In addition, using SWITCH function should also work. :smileyhappy:
FirstDayEndTime = SWITCH ( Customers[Type], "Type A", DATE ( YEAR ( incident[createdon] ), MONTH ( incident[createdon] ), DAY ( incident[createdon] ) ) & " 17:00:00", "Type B", DATE ( YEAR ( incident[createdon] ), MONTH ( incident[createdon] ), DAY ( incident[createdon] ) ) & " 18:00:00", "Type C", DATE ( YEAR ( incident[createdon] ), MONTH ( incident[createdon] ), DAY ( incident[createdon] ) ) & " 19:00:00", "Type D", DATE ( YEAR ( incident[createdon] ), MONTH ( incident[createdon] ), DAY ( incident[createdon] ) ) & " 20:00:00" )Regards
Hi tmears
From my point of view ...
if you know and can assign to each customer a range hour.
Let's say all the customers that end their hours at 17:00 could be assigned 'Type A', and all those that end their hours at 18:00 could be assigned 'Type B'
Then you could use ....
FirstDayEndTime =
IF(
Customers[Type] = "Type A",
DATE ( YEAR ( incident[createdon] ), MONTH ( incident[createdon] ), DAY ( incident[createdon] ) )
& " 17:00:00",
DATE ( YEAR ( incident[createdon] ), MONTH ( incident[createdon] ), DAY ( incident[createdon] ) )
& " 18:00:00"
)
Hope That Helps
Vicente