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 |
---|---|
40 | |
36 | |
34 | |
23 | |
17 |