<?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 SAS VA: Update-Friendly Parameter with Multiple Measures in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VA-Update-Friendly-Parameter-with-Multiple-Measures/m-p/793097#M15780</link>
    <description>&lt;P&gt;I'm working on a report in SAS VA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the sake of simplicity, I have three measures (num_var_1, num_var_2, num_var_3), and I have a character parameter with 'Multiple values' enabled (measures_parameter).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also have a List control object, which is populated with corresponding character strings for those measures (e.g. 'num_var_1', 'num_var_2', 'num_var_3'). Multiple values can be selected on this List control object. Measures_parameter is also attached to this List control object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Essentially, I want to create a new calculated item (num_var_total), which is the SUM of any/all of the three measures which are selected in the List control object. I have managed to achieve this with the following code:&lt;/P&gt;&lt;PRE&gt;(IF ( 'num_var_1' IN 'measures_paremeter'p )
RETURN 'num_var_1'n
ELSE 0 ) 
+
(IF ( 'num_var_2' IN 'measures_paremeter'p )
RETURN 'num_var_2'n
ELSE 0 ) 
+
(IF ( 'num_var_3' IN 'measures_paremeter'p )
RETURN 'num_var_3'n
ELSE 0 ) &lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;However&lt;/STRONG&gt;, in practice, I actually have 30+ different measures, and these measures will be regularly changed (with new measures added or old ones removed).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, &lt;EM&gt;the question&lt;/EM&gt;: Is there any way that this code can be amended so that it will be more update-friendly? More specifically, is there any way that the code can be amended so that it will automatically recognise changes to the measures, so that I don't have to write code for 30+ individual measures and rewrite this code whenever the measures are updated?&lt;/P&gt;</description>
    <pubDate>Fri, 28 Jan 2022 10:55:27 GMT</pubDate>
    <dc:creator>George12</dc:creator>
    <dc:date>2022-01-28T10:55:27Z</dc:date>
    <item>
      <title>SAS VA: Update-Friendly Parameter with Multiple Measures</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VA-Update-Friendly-Parameter-with-Multiple-Measures/m-p/793097#M15780</link>
      <description>&lt;P&gt;I'm working on a report in SAS VA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the sake of simplicity, I have three measures (num_var_1, num_var_2, num_var_3), and I have a character parameter with 'Multiple values' enabled (measures_parameter).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also have a List control object, which is populated with corresponding character strings for those measures (e.g. 'num_var_1', 'num_var_2', 'num_var_3'). Multiple values can be selected on this List control object. Measures_parameter is also attached to this List control object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Essentially, I want to create a new calculated item (num_var_total), which is the SUM of any/all of the three measures which are selected in the List control object. I have managed to achieve this with the following code:&lt;/P&gt;&lt;PRE&gt;(IF ( 'num_var_1' IN 'measures_paremeter'p )
RETURN 'num_var_1'n
ELSE 0 ) 
+
(IF ( 'num_var_2' IN 'measures_paremeter'p )
RETURN 'num_var_2'n
ELSE 0 ) 
+
(IF ( 'num_var_3' IN 'measures_paremeter'p )
RETURN 'num_var_3'n
ELSE 0 ) &lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;However&lt;/STRONG&gt;, in practice, I actually have 30+ different measures, and these measures will be regularly changed (with new measures added or old ones removed).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, &lt;EM&gt;the question&lt;/EM&gt;: Is there any way that this code can be amended so that it will be more update-friendly? More specifically, is there any way that the code can be amended so that it will automatically recognise changes to the measures, so that I don't have to write code for 30+ individual measures and rewrite this code whenever the measures are updated?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 10:55:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VA-Update-Friendly-Parameter-with-Multiple-Measures/m-p/793097#M15780</guid>
      <dc:creator>George12</dc:creator>
      <dc:date>2022-01-28T10:55:27Z</dc:date>
    </item>
  </channel>
</rss>

