Can someone help me finish this expression?
OR( WEEKDAY([Pickup]) = 7, WEEKDAY([Pickup]) = 1, WEEKDAY([Pickup]) = 6 )
I am attempting to create an expression to show a list of orders if the current [Pickup] day is Friday, Saturday, or Sunday, but I do not want to show the orders for Friday, if [Pickup] is Saturday. If [Pickup] is Sunday, I do not want to show the orders for Friday or Saturday. The [Pickup] column is just a simple date column. Iโve spent many hours trying to figure this one out so if someone can give me a boost, thatโd be great.
Iโve been trying to do something likeโฆ
AND( OR( WEEKDAY([Pickup]) = 7, WEEKDAY([Pickup]) = 1, WEEKDAY([Pickup]) = 6 ), AND(
NOT(WEEKDAY(TODAY()) >= WEEKDAY([Pickup]) = 6),
NOT(WEEKDAY(TODAY()) >= WEEKDAY([Pickup]) = 7) ) )
โฆand similar expressions and just canโt come up with anything thatโs working.
Thanks
@Brady_Lovell will this be a Valid_If expression for the [ORDERS] column? OR will this be a condition expression for a slice? Can you elaborate?
@Levent_KULACOGLU Iโm thinking it should be a slice row filter condition. My main table is 4-5000 rows of orders, with the column [Pickup] that has each pickup date for each order. I have a slice called โagendaWeekendOrdersโ that has this Row filterโฆ
OR( WEEKDAY([Pickup]) = 7, WEEKDAY([Pickup]) = 1, WEEKDAY([Pickup]) = 6 )
โฆwhich shows the rows of the slice if [Pickup] is Friday, Saturday, or Sunday.
I then have a Ref view called โrefAgendaWeekendโ that has this Show_If constraintโฆ
OR( WEEKDAY(TODAY()) = 6, WEEKDAY(TODAY()) = 7, WEEKDAY(TODAY()) = 1 )
โฆwhich shows the slice โagendaWeekendOrdersโ if the current day is Friday, Saturday, or Sunday.
Up until this point, everything is working as it should. Problem is, today is Sunday, and I can still see Friday and Saturdayโs orders in the Ref view โrefAgendaWeekendโ.
Try this expression @Brady_Lovell
IFS( WEEKDAY(TODAY())=7,WEEKDAY(TODAY())<6, WEEKDAY(TODAY())=1,AND(WEEKDAY(TODAY())>1,WEEKDAY(TODAY())<6) )
@Levent_KULACOGLU you can also try this one as Iโm unaware of both your app and your sheetโs structure:
IFS( WEEKDAY(TODAY())=7,WEEKDAY([Pickup])<6, WEEKDAY(TODAY())=1,AND(WEEKDAY([Pickup])>1,WEEKDAY([Pickup])<6) )
I believe you will need 3 different slices, one for each day and have 3 different refviews.
@Bellave_Jayaram Yes, that definitely seems like a plausible workaround. Thanks for mentioning this. I will go this route if I canโt figure it out with expressions. Iโd like to keep it down to a single Ref view if at all possible. Thanks for the suggestions @Levent_KULACOGLU. I will work on it and see what I come up with.
May I ask why donโt you use just [Pickup]>=TODAY()
@Aleksi_Alkio Overthinking things againโฆlol Thanks Translate
User | Count |
---|---|
44 | |
29 | |
22 | |
20 | |
14 |