<?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: Format in IF-RETURN-ELSE-statement in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Format-in-IF-RETURN-ELSE-statement/m-p/592711#M13101</link>
    <description>That's a common issue in most DBs, you cannot have a single column have multiple types. What you can do is have the value pre-formatted and push it in as a character, but then you can't summarize/aggregate it. You may be better off splitting this into two variables?</description>
    <pubDate>Mon, 30 Sep 2019 15:08:55 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-09-30T15:08:55Z</dc:date>
    <item>
      <title>Format in IF-RETURN-ELSE-statement</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Format-in-IF-RETURN-ELSE-statement/m-p/592710#M13100</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if have a measure in VA 8.3 which is defined by a IF-RETURN-ELSE Statement, let's call it test-measure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF 'parameter'p = "a"&lt;/P&gt;&lt;P&gt;RETURN 0.01&lt;/P&gt;&lt;P&gt;ELSE 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to have &lt;EM&gt;percent12.2&amp;nbsp;'&lt;/EM&gt;if parameter'p = "a" and comma12. if&amp;nbsp;'parameter'p ^= "a". But formats in VA are linked to the format of test-measure. I tried to define a character-variable called format by&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF&amp;nbsp;'parameter'p = "a"&lt;/P&gt;&lt;P&gt;RETURN "COMMA12."&lt;/P&gt;&lt;P&gt;ELSE "PERCENT12.2"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and changed the xml file of my report by adding the variable name of my new character variable to the format statement of the old one, but it did not work(the code looked like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(&amp;lt;AggregateCalculatedItem dataType="double" name="bi5139" label="Berichtsgröße" format="bi1234"&amp;gt;&lt;BR /&gt;&amp;lt;Expression&amp;gt;cond(eq(#{pr2548},'Relationen'),times(${bi5044,raw},100),${bi5134,raw})&amp;lt;/Expression&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VA could not recognize it and compiled the variable as BESTX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any other workaround for my problem?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 15:07:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Format-in-IF-RETURN-ELSE-statement/m-p/592710#M13100</guid>
      <dc:creator>AB_prv</dc:creator>
      <dc:date>2019-09-30T15:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: Format in IF-RETURN-ELSE-statement</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Format-in-IF-RETURN-ELSE-statement/m-p/592711#M13101</link>
      <description>That's a common issue in most DBs, you cannot have a single column have multiple types. What you can do is have the value pre-formatted and push it in as a character, but then you can't summarize/aggregate it. You may be better off splitting this into two variables?</description>
      <pubDate>Mon, 30 Sep 2019 15:08:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Format-in-IF-RETURN-ELSE-statement/m-p/592711#M13101</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-09-30T15:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Format in IF-RETURN-ELSE-statement</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Format-in-IF-RETURN-ELSE-statement/m-p/592814#M13102</link>
      <description>&lt;P&gt;It is my understanding that use of SAS formats is "static" in SAS VA. You can change the report display format when building reports but not on the fly when running them.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 19:58:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Format-in-IF-RETURN-ELSE-statement/m-p/592814#M13102</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-09-30T19:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: Format in IF-RETURN-ELSE-statement</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Format-in-IF-RETURN-ELSE-statement/m-p/592934#M13105</link>
      <description>&lt;P&gt;Thank you for your suggestion, but that is not possible. Ich have a crosstable with more than 100 different variables, which are collected in one display-variable by a IF-RETURN-ELSE-statement. The display-variable itself is a agregated measure, so I cannot change the format to alphanumerical.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The column has to have one format, but the format depends on the value of a parameter.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 07:33:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Format-in-IF-RETURN-ELSE-statement/m-p/592934#M13105</guid>
      <dc:creator>AB_prv</dc:creator>
      <dc:date>2019-10-01T07:33:14Z</dc:date>
    </item>
  </channel>
</rss>

