Initial Value based on current view

Hi.

I am trying to set the initial value of a column based the view the user is in. The column, [Moisture Content], is included in 3 slices. If the user is in either of the first 2 slices/views I just want to return the existing [Moisture Content] value but if they are in the 3rd slice/view AND the value is above 28 I want to set the value back to 28. I have something like this as my expression but I am getting and error.

Expression:
IFS(
CONTEXT(โ€œFabrication (Create) Stageโ€),[Moisture Content],
CONTEXT(โ€œFabrication (Update) Stageโ€),[Moisture Content],
AND(CONTEXT(โ€œPre-Treatment Stageโ€),[Moisture Content]>28),28
)

Error
Condition AND(CONTEXT(โ€œPre-Treatment Stageโ€), ([Moisture Content] > 28)) has an invalid structure: subexpressions must be Yes/No conditions

Hope this makes sense. Any advice would be great, thank you.

0 3 519
3 REPLIES 3

Try this:

IFS(
CONTEXT(โ€œViewโ€) = โ€œFabrication (Create) Stageโ€,[Moisture Content],
CONTEXT(โ€œViewโ€) = โ€œFabrication (Update) Stageโ€,[Moisture Content],
AND(CONTEXT(โ€œViewโ€) = โ€œPre-Treatment Stageโ€ , [Moisture Content]>28 ) , 28
)

Thanks so much @Fernando_Lopez

Your welcome

Top Labels in this Space