<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Confusing Datasource Filter in SAS VA in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Confusing-Datasource-Filter-in-SAS-VA/m-p/879851#M17278</link>
    <description>&lt;P&gt;Hi Markus,&amp;nbsp;&lt;BR /&gt;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.&lt;/P&gt;&lt;PRE&gt;( 'Rolling Stocktake Year'p = 'Rolling Stocktake Timetable'n ) OR
( 'Controlled Item Indicator'n = 'YES' )&lt;/PRE&gt;&lt;P&gt;Much simpler and more readily understood &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 06:13:19 GMT</pubDate>
    <dc:creator>JeremyAT</dc:creator>
    <dc:date>2023-06-09T06:13:19Z</dc:date>
    <item>
      <title>Confusing Datasource Filter in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Confusing-Datasource-Filter-in-SAS-VA/m-p/879838#M17276</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I'm currently working on a dashboard that was developed by someone else and they have used a datasource filter that I'm struggling to wrap by head around. I'm using&amp;nbsp;SAS VA 8.5.1 on SAS Viya 3.05.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;IF ( 'Rolling Stocktake Schedule'n = 'Year One' )
RETURN ( ( 'Controlled Item Indicator'n = 'YES' ) OR (
'Rolling Stocktake Timetable'n = 'Year One' ) )
ELSE (
IF ( 'Rolling Stocktake Schedule'n = 'Year Two' )
RETURN ( ( 'Controlled Item Indicator'n = 'YES' ) OR (
'Rolling Stocktake Timetable'n = 'Year Two' ) )
ELSE (
IF ( 'Rolling Stocktake Schedule'n = 'Year Three' )
RETURN ( ( 'Controlled Item Indicator'n = 'YES' ) OR (
'Rolling Stocktake Timetable'n = 'Year Three' ) )
ELSE ( 'Main Asset Number'n Missing ) ) )&lt;/PRE&gt;&lt;P&gt;I can't understand why the filter references&amp;nbsp;'Rolling Stocktake Schedule'n in both the IF and RETURN statements for all three values of&amp;nbsp;'Rolling Stocktake Schedule'n, or why the OR statement is used.&lt;/P&gt;&lt;P&gt;Is the filter stating: If&amp;nbsp;'Rolling Stocktake Schedule' is equal to "Year One" then return any rows where&amp;nbsp;'Rolling Stocktake Schedule' is equal to "Year One" or&amp;nbsp;'Controlled Item Indicator'n = 'YES', excluding all others, then repeating this for "Year Two" and "Year Three".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In other words, return all rows where&amp;nbsp;'Rolling Stocktake Schedule' is equal to "Year One", "Year Two", "Year Three", or&amp;nbsp;'Controlled Item Indicator'n = 'YES'. Is this right?&lt;/P&gt;&lt;P&gt;Also, does the final ELSE statement return any rows where&amp;nbsp;'Main Asset Number'n = Missing, or excludes these?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 23:27:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Confusing-Datasource-Filter-in-SAS-VA/m-p/879838#M17276</guid>
      <dc:creator>JeremyAT</dc:creator>
      <dc:date>2023-06-08T23:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: Confusing Datasource Filter in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Confusing-Datasource-Filter-in-SAS-VA/m-p/879842#M17277</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/442921"&gt;@JeremyAT&lt;/a&gt;, in your post I see different variables in the IF and in the OR clause:&lt;/P&gt;
&lt;P&gt;In the IF it's 'Rolling Stocktake &lt;STRONG&gt;&lt;U&gt;Schedule&lt;/U&gt;&lt;/STRONG&gt;'n and in the OR it's&amp;nbsp;&amp;nbsp;'Rolling Stocktake &lt;STRONG&gt;&lt;U&gt;Timetable&lt;/U&gt;&lt;/STRONG&gt;'n.&lt;/P&gt;
&lt;P&gt;Maybe you should look into the difference of the two variables?&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;Markus&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 04:05:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Confusing-Datasource-Filter-in-SAS-VA/m-p/879842#M17277</guid>
      <dc:creator>MarkusWeick</dc:creator>
      <dc:date>2023-06-09T04:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: Confusing Datasource Filter in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Confusing-Datasource-Filter-in-SAS-VA/m-p/879851#M17278</link>
      <description>&lt;P&gt;Hi Markus,&amp;nbsp;&lt;BR /&gt;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.&lt;/P&gt;&lt;PRE&gt;( 'Rolling Stocktake Year'p = 'Rolling Stocktake Timetable'n ) OR
( 'Controlled Item Indicator'n = 'YES' )&lt;/PRE&gt;&lt;P&gt;Much simpler and more readily understood &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 06:13:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Confusing-Datasource-Filter-in-SAS-VA/m-p/879851#M17278</guid>
      <dc:creator>JeremyAT</dc:creator>
      <dc:date>2023-06-09T06:13:19Z</dc:date>
    </item>
  </channel>
</rss>

