Forum Discussion
jmetf150
2 years agoHelper I
Switch with dates and text values/format
I am trying to write a SWITCH function that looks at a TEXT column ( [RS] ), and depending on the text value "OT", then compares between two other DATE columns ( [RDD] & [RCD] )to derive another TEXT...
- 2 years ago
jmetf150 I think you want:
Cond = switch(TRUE(), 'R'[RS]="OT", IF('R'[RDD]<='R'[RCD], "PD", "LLT") ) or Cond = switch('R'[RS], "OT", IF('R'[RDD]<='R'[RCD], "PD", "LLT") )
Greg_Deckler
2 years agoCommunity Champion
jmetf150 Try:
LateStatus =
SWITCH( TRUE(),
ZMMAE[OT X 2 to Cur MRP Need]="Late" && ZMMAE[Del Date]>ZMMAE[Cur MRP Need], "Late in Past",
ZMMAE[OT X 2 to Cur MRP Need]="Late" && ZMMAE[Del Date]<ZMMAE[Cur MRP Need],"Late in the Future",
""
)
jmetf150
2 years agoHelper I
That is working to only pull the "Late" orders but it is saying all of the late orders are "In THe Past". I am fairly certain that is incorrect but the source data consists of over 7K lines so let me find one that is "Late in the Future" and see what it is pulling that way.