Forum Discussion
Allisond
5 years agoAdvocate II
Using VAR if returns BLANK then next Calculation in Switch True
Good Afternoon, This is a small sample of what I am trying to do to get a value closest to a date. I have multiple VAR for -29 days, -31 days etc.. Please see below. My first Result for "Th...
- 5 years ago
Hi Allisond
It's abit complicated to understand but looking at your SWITCH, the order of the logic needs changing. If ValidRow is True then the 2nd line (ValidRow && ThirtyDWt) will never be evaluated
Try this
Return SWITCH( TRUE(), ValidRow && ThirtyDWt = BLANK(), ThirtyMin1Wt, ValidRow, ThirtyDWt, BLANK() )Regards
Phil
Allisond
5 years agoAdvocate II
I was not leveraging the logic correctly thinking about the "true" and how if false then moves to the next. Adjusted my statements to
Valid Row && ThirtyDWt <> BLANK(), ThirtyDWt,
Valid Row && ThirtyDMin1Wt <> BLANK(), ThirtyDMin1Wt,
Etc.
And this seemed to take care of it. Thank you for your help in getting me to think this through.
PhilipTreacy
5 years agoSuper User
Hi Allisond
If my answers helped to solve your problem please mark my answer(s) as the solution.
regards
Phil