Forum Discussion
ADSL
Post Prodigy
3 years agoCalculate Sales Order within Time Group
Hi BI Community Team,
We're looking for the number of order | NO order & customer visited with condition below that have in table of "Visit Summary"
1. # Order & NO order based on indicator
2. # Customer Visited
For time group:
If time is from 1:00:00 am to 7:59:59 am = early morning
If time is from 8:00:00 am to 11:59:59 am = morning
If time is from 12:00:00 pm to 13:29:59 pm = lunch
If time is from 13:30:00 pm to 17:29:59 pm = afternoon
If time is from 17:30:00 pm to 20:59:59 pm = evening
If time is from 21:00:00 pm to 23:59:59 pm = late evening
Any suggestion/advise?
Thanks and Regards,
ADSL , Create a new column like
Column = SWITCH(TRUE(), [TIME_IN] >= time(1,0,0) && [TIME_IN] < time(8,0,0), "Early Morning", [TIME_IN] >= time(8,0,0) && [TIME_IN] < time(12,0,0), "Morning", [TIME_IN] >= time(12,0,0) && [TIME_IN] < time(13,30,0), "Lunch", [TIME_IN] >= time(13,30,0) && [TIME_IN] < time(17,30,0), "Afternoon", [TIME_IN] >= time(17,30,0) && [TIME_IN] < time(21,0,0), "Evening", "Late Evening")
1 Reply
- amitchandak
Super User
ADSL , Create a new column like
Column = SWITCH(TRUE(), [TIME_IN] >= time(1,0,0) && [TIME_IN] < time(8,0,0), "Early Morning", [TIME_IN] >= time(8,0,0) && [TIME_IN] < time(12,0,0), "Morning", [TIME_IN] >= time(12,0,0) && [TIME_IN] < time(13,30,0), "Lunch", [TIME_IN] >= time(13,30,0) && [TIME_IN] < time(17,30,0), "Afternoon", [TIME_IN] >= time(17,30,0) && [TIME_IN] < time(21,0,0), "Evening", "Late Evening")