<?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: visual analytics percentage error calculation in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/visual-analytics-percentage-error-calculation/m-p/714343#M14594</link>
    <description>&lt;P&gt;Would this work? I created a calculated Item named APE&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="APECalculation.jpg" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53929iE89947EAF9F49E89/image-size/large?v=v2&amp;amp;px=999" role="button" title="APECalculation.jpg" alt="APECalculation.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="APECalculationReport.jpg" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53930i666032A8047D0486/image-size/large?v=v2&amp;amp;px=999" role="button" title="APECalculationReport.jpg" alt="APECalculationReport.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Jan 2021 18:01:22 GMT</pubDate>
    <dc:creator>MelCar</dc:creator>
    <dc:date>2021-01-26T18:01:22Z</dc:date>
    <item>
      <title>visual analytics percentage error calculation</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/visual-analytics-percentage-error-calculation/m-p/713871#M14589</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to do a calculation of forecast performance in visual analytics.&lt;/P&gt;
&lt;P&gt;The answer I need is a nuanced version of the mean absolute percentage error but hopefully this example will explain.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TimCampbell_0-1611574348070.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53859i882D3BEFFBA6496D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TimCampbell_0-1611574348070.png" alt="TimCampbell_0-1611574348070.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this spreadsheet i have some random data by date and some other groupings with forecasts and what the outturn value was, and 3 different ways of calculating the absolute percentage error.&lt;BR /&gt;option 1 I can do in VA by doing a sum by group abs(forecast-outturn) but you can see that because I have different sectors etc the percentage is way too high.&lt;BR /&gt;option 2 I can do by doing abs(sum by group forecast - sum by group outturn) but this is way too low because the errors are netting out between the different days.&lt;/P&gt;
&lt;P&gt;option 3 is what I need but I don't know how to get VA to do the sum by date first and then work out the total as a second step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know that one option would be to use aggregated tables to get the totals by date and then calculate from there but for the final report we are interested how it differs if I filter on just a specific sector or class so I need it to be more flexible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If anyone has any insight on this it would be much appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tim&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 11:41:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/visual-analytics-percentage-error-calculation/m-p/713871#M14589</guid>
      <dc:creator>TimCampbell</dc:creator>
      <dc:date>2021-01-25T11:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: visual analytics percentage error calculation</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/visual-analytics-percentage-error-calculation/m-p/714343#M14594</link>
      <description>&lt;P&gt;Would this work? I created a calculated Item named APE&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="APECalculation.jpg" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53929iE89947EAF9F49E89/image-size/large?v=v2&amp;amp;px=999" role="button" title="APECalculation.jpg" alt="APECalculation.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="APECalculationReport.jpg" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53930i666032A8047D0486/image-size/large?v=v2&amp;amp;px=999" role="button" title="APECalculationReport.jpg" alt="APECalculationReport.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 18:01:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/visual-analytics-percentage-error-calculation/m-p/714343#M14594</guid>
      <dc:creator>MelCar</dc:creator>
      <dc:date>2021-01-26T18:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: visual analytics percentage error calculation</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/visual-analytics-percentage-error-calculation/m-p/714508#M14597</link>
      <description>&lt;P&gt;No, that one is summing all the individual absolute errors so it's overstating the error.&lt;/P&gt;
&lt;P&gt;here is an updated view of the spreadsheet with the calculations for how the grouping should break down. (also corrected the sums pointing to the wrong range on one of them)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TimCampbell_0-1611740458667.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53954i7D76F646E1A89A10/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TimCampbell_0-1611740458667.png" alt="TimCampbell_0-1611740458667.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the calculation I am after is...&lt;/P&gt;
&lt;P&gt;Abs Error =&amp;nbsp;abs ( Sum (By [Class/Sector/Ect.] and Date) Forecast&amp;nbsp; -&amp;nbsp;&amp;nbsp;Sum (By [Class/Sector/Ect.] and Date) Outturn )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MAPE = Sum (By&amp;nbsp;[Class/Sector/Ect.]) Abs Error /&amp;nbsp;Sum (By&amp;nbsp;[Class/Sector/Ect.]) Outturn&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but VA won't let you put the aggregation Abs Error into another aggregation.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 09:46:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/visual-analytics-percentage-error-calculation/m-p/714508#M14597</guid>
      <dc:creator>TimCampbell</dc:creator>
      <dc:date>2021-01-27T09:46:50Z</dc:date>
    </item>
  </channel>
</rss>

