I can't understand why the filter references 'Rolling Stocktake Schedule'n in both the IF and RETURN statements for all three values of 'Rolling Stocktake Schedule'n, or why the OR statement is used.
Is the filter stating: If 'Rolling Stocktake Schedule' is equal to "Year One" then return any rows where 'Rolling Stocktake Schedule' is equal to "Year One" or 'Controlled Item Indicator'n = 'YES', excluding all others, then repeating this for "Year Two" and "Year Three".
In other words, return all rows where 'Rolling Stocktake Schedule' is equal to "Year One", "Year Two", "Year Three", or 'Controlled Item Indicator'n = 'YES'. Is this right?
Also, does the final ELSE statement return any rows where 'Main Asset Number'n = Missing, or excludes these?
Hi @JeremyAT, in your post I see different variables in the IF and in the OR clause:
In the IF it's 'Rolling Stocktake Schedule'n and in the OR it's 'Rolling Stocktake Timetable'n.
Maybe you should look into the difference of the two variables?
Please keep the community friendly. Like posts you agree with or like. Mark helpful answers as “accepted solutions”. Generally have a look at https://communities.sas.com/t5/Getting-Started/tkb-p/community_articles
Hi Markus, I managed to understand how the filter was working by creating a calculated item with the same code and looking at what was being included and excluded. In the end, I managed to work out that the filter could be simplified to the follow.
Secure your spot at the must-attend AI and analytics event of 2024: SAS Innovate 2024! Get ready for a jam-packed agenda featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events.
Register by March 1 to snag the Early Bird rate of just $695! Don't miss out on this exclusive offer.