<?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>Question Re: Custom variance analysis in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/custom-variance-analysis/qaa-p/12610144#M4729558</link>
    <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;kocomandi&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Currently the IF condition in the calculated measure does not accept string and numeric as parameter at the same time. for e.g. IF(Variance%&amp;gt;0.5,"abc","def") will not work. But this will work IF(Variance%&amp;gt;0.5,1,0).  This is as per design as all numeric calculations are measures and any categorical calculationlike "high" , "low" etc  based on measure is a calculated dimension.You can try a workaround as below&lt;/P&gt;&lt;P&gt;This can be done as a calculated measure in the stories. You will need two restricted measure namely Actual and Plan and then a calculated measure for variance %. You can create the final categorical analysis as calculated dimension to see if the variance % exceeds a certain % to call it "nm". Example shown below.
&lt;/P&gt;&lt;P&gt;Actual Restricted Measure&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2082549-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Plan Restricted Measure&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2082550-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Variance % Calculated Measure&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2082551-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Finally you will need to create a Calculated dimension in the form of measure based dimension and then lay out the condition of variances. In my example I have done variance greater than 5%. See below.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2082553-image.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2082552-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Final Output&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2082554-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Please upvote/accept if this helps you.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Nikhil&lt;/P&gt;</description>
    <pubDate>Sun, 31 Jul 2022 21:53:11 GMT</pubDate>
    <dc:creator>N1kh1l</dc:creator>
    <dc:date>2022-07-31T21:53:11Z</dc:date>
    <item>
      <title>Custom variance analysis</title>
      <link>https://community.sap.com/t5/technology-q-a/custom-variance-analysis/qaq-p/12610143</link>
      <description>&lt;P&gt;How can I create a custom formula in a sac story where, if the % variance between plan and actual is greater than 999% then the formula should give "nm"?&lt;/P&gt;
  &lt;P&gt;I have tried to create this variance not as a calculated measure and the format of formula is not supported by SAP. &lt;/P&gt;
  &lt;P&gt;One would think that the SAP would do any calculation what is done in excel. These are very basic formula and are helptul for management reporting.&lt;/P&gt;
  &lt;P&gt;Anyone has any idea how to do this?&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jul 2022 21:15:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/custom-variance-analysis/qaq-p/12610143</guid>
      <dc:creator>kocomandi</dc:creator>
      <dc:date>2022-07-31T21:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: Custom variance analysis</title>
      <link>https://community.sap.com/t5/technology-q-a/custom-variance-analysis/qaa-p/12610144#M4729558</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;kocomandi&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Currently the IF condition in the calculated measure does not accept string and numeric as parameter at the same time. for e.g. IF(Variance%&amp;gt;0.5,"abc","def") will not work. But this will work IF(Variance%&amp;gt;0.5,1,0).  This is as per design as all numeric calculations are measures and any categorical calculationlike "high" , "low" etc  based on measure is a calculated dimension.You can try a workaround as below&lt;/P&gt;&lt;P&gt;This can be done as a calculated measure in the stories. You will need two restricted measure namely Actual and Plan and then a calculated measure for variance %. You can create the final categorical analysis as calculated dimension to see if the variance % exceeds a certain % to call it "nm". Example shown below.
&lt;/P&gt;&lt;P&gt;Actual Restricted Measure&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2082549-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Plan Restricted Measure&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2082550-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Variance % Calculated Measure&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2082551-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Finally you will need to create a Calculated dimension in the form of measure based dimension and then lay out the condition of variances. In my example I have done variance greater than 5%. See below.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2082553-image.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2082552-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Final Output&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2082554-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Please upvote/accept if this helps you.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Nikhil&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jul 2022 21:53:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/custom-variance-analysis/qaa-p/12610144#M4729558</guid>
      <dc:creator>N1kh1l</dc:creator>
      <dc:date>2022-07-31T21:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: Custom variance analysis</title>
      <link>https://community.sap.com/t5/technology-q-a/custom-variance-analysis/qaa-p/12610145#M4729559</link>
      <description>&lt;P&gt;Hi Hikhil,&lt;/P&gt;&lt;P&gt;Thank you for your response. However, I want this the nw not in a separate column, but on the same column as % variance.&lt;/P&gt;&lt;P&gt;Yes, my report includes already the restricted measures for actual and plan. &lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 12:00:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/custom-variance-analysis/qaa-p/12610145#M4729559</guid>
      <dc:creator>kocomandi</dc:creator>
      <dc:date>2022-08-01T12:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Custom variance analysis</title>
      <link>https://community.sap.com/t5/technology-q-a/custom-variance-analysis/qaa-p/12610146#M4729560</link>
      <description>&lt;P&gt;Actually I resolved this by adding a column after all my $ variance and there I build an multiple if conditions and it worked. &lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 13:37:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/custom-variance-analysis/qaa-p/12610146#M4729560</guid>
      <dc:creator>kocomandi</dc:creator>
      <dc:date>2022-08-08T13:37:07Z</dc:date>
    </item>
  </channel>
</rss>

