<?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: SAS VA - Subtracting two columns in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VA-Subtracting-two-columns/m-p/908186#M17690</link>
    <description>&lt;P&gt;Maybe I missed that the two columns are in a crosstab and not original data columns.&lt;/P&gt;</description>
    <pubDate>Fri, 15 Dec 2023 13:55:35 GMT</pubDate>
    <dc:creator>MarkusWeick</dc:creator>
    <dc:date>2023-12-15T13:55:35Z</dc:date>
    <item>
      <title>SAS VA - Subtracting two columns</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VA-Subtracting-two-columns/m-p/908183#M17687</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need help on how to subtract one column from another in SAS VA.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-12-15 143138.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/91439iACEB54DAFC31FB14/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-12-15 143138.png" alt="Screenshot 2023-12-15 143138.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I need another column next to the TEKUCI one that will be the difference = PRETHODNI - TEKUCI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or in this case below, another row, under TEKUCI, whic will be equal PRETHODNI - TEKUCI&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/91440iF35B648D1FA04B4D/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this even possible? I didn't find anywhere any solution.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 13:36:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VA-Subtracting-two-columns/m-p/908183#M17687</guid>
      <dc:creator>tijanagilic</dc:creator>
      <dc:date>2023-12-15T13:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: SAS VA - Subtracting two columns</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VA-Subtracting-two-columns/m-p/908184#M17688</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/443558"&gt;@tijanagilic&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;as this is an important feature I link the documentation of calculated items, with which you could define a Difference column.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/vacdc/8.3/vareportdata/p04o9h4r6dgaqnn1mgwiz7ln1ru0.htm" target="_blank"&gt;SAS Help Center: Working with Calculated Items in a Report&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;Markus&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 13:42:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VA-Subtracting-two-columns/m-p/908184#M17688</guid>
      <dc:creator>MarkusWeick</dc:creator>
      <dc:date>2023-12-15T13:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: SAS VA - Subtracting two columns</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VA-Subtracting-two-columns/m-p/908185#M17689</link>
      <description>&lt;P&gt;I think there's going to be a problem though in how&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/443558"&gt;@tijanagilic&lt;/a&gt;&amp;nbsp;wants to display this. Getting the calculated value isn't going to be too difficult, but displaying it as another row/column after TEKUCI I don't think is possible. You can only create it as a new measure, which means it will show up as a column next to # (and thus appear twice in the crosstab, once for PRETHODNI and once for TEKUCI) rather than next to TEKUCI as a single column.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I don't know what the column is called that contains both PRETHODNI and TEKUCI so I'm just going to call it Column but what I might recommend doing to get the visual you want is the following:&lt;BR /&gt;&lt;BR /&gt;1. Create two new calculated items to represent the value of # for both&amp;nbsp;PRETHODNI and TEKUCI:&lt;BR /&gt;&lt;BR /&gt;If Column IN (PRETHODNI)&lt;/P&gt;
&lt;P&gt;RETURN #&lt;/P&gt;
&lt;P&gt;ELSE 0&lt;BR /&gt;&lt;BR /&gt;and&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;If Column IN (TEKUCI)&lt;/P&gt;
&lt;P&gt;RETURN #&lt;/P&gt;
&lt;P&gt;ELSE 0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now you have two new measures, we'll say Prethodni # and Tekuci #.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Create a third calculated item for the difference:&lt;BR /&gt;&lt;BR /&gt;Prethodni # - Tekuci #&lt;BR /&gt;&lt;BR /&gt;3. In your crosstab, take out Column and #, and instead use the three new measures we created.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I've misunderstood something though let me know.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 13:48:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VA-Subtracting-two-columns/m-p/908185#M17689</guid>
      <dc:creator>HunterT_SAS</dc:creator>
      <dc:date>2023-12-15T13:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: SAS VA - Subtracting two columns</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VA-Subtracting-two-columns/m-p/908186#M17690</link>
      <description>&lt;P&gt;Maybe I missed that the two columns are in a crosstab and not original data columns.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 13:55:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VA-Subtracting-two-columns/m-p/908186#M17690</guid>
      <dc:creator>MarkusWeick</dc:creator>
      <dc:date>2023-12-15T13:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAS VA - Subtracting two columns</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VA-Subtracting-two-columns/m-p/908189#M17691</link>
      <description>&lt;P&gt;It worked!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 14:18:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-VA-Subtracting-two-columns/m-p/908189#M17691</guid>
      <dc:creator>tijanagilic</dc:creator>
      <dc:date>2023-12-15T14:18:24Z</dc:date>
    </item>
  </channel>
</rss>

