Can someone help me finish this expression? ...

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

0 8 324
8 REPLIES 8

@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

Top Labels in this Space