<?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: Using context with calculated variables in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/using-context-with-calculated-variables/qaa-p/12610034#M4729508</link>
    <description>&lt;P&gt;I think my issue is the calculated green columns are measures and not dimensions. I made a sample webi report like you did with the values as dimensions and I'm getting the right results like you are.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2061545-image.png" /&gt;&lt;/P&gt;&lt;P&gt;When I remove Employee - Key and Profit Center and add count of profit center for each Employee - Key, ideally I should get the 2nd table below. But I'm getting the 3rd table.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2061548-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Making the measure a dimension doesn't work, I played around with making it a text so it doesn't auto sum but that's not working either. How can I get vProfit for each employee - key without it summing it up to 3.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jun 2022 00:09:57 GMT</pubDate>
    <dc:creator>former_member808993</dc:creator>
    <dc:date>2022-06-17T00:09:57Z</dc:date>
    <item>
      <title>Using context with calculated variables</title>
      <link>https://community.sap.com/t5/technology-q-a/using-context-with-calculated-variables/qaq-p/12610032</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;Hoping to get some answers. I have the 5 green columns as calculated measures.&lt;/P&gt;
  &lt;P&gt;I want to remove Employee - Key and keep Tenure &amp;amp; Classification dim and summarize it like the 2nd table.&lt;/P&gt;
  &lt;P&gt;It should summarize as &lt;/P&gt;
  &lt;P&gt;If (vProfit &amp;amp; VPosition &amp;amp; vPay &amp;amp; vTenure &amp;amp; vClass) = 1, Then Unmodified Amount = 1.0000 Else Unmodified Amount for each Employee - Key. What I have in Orange column is the desired output.&lt;/P&gt;
  &lt;P&gt;I've tried numerous ways but is it possible to use context in calculated figures? When I remove Employee - Key from the table, all the calculated figures (green column) just sum up and the above if statement breaks because it is no longer looking at by Employee - Key.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2061520-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/2061521-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Thank you !&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 18:13:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/using-context-with-calculated-variables/qaq-p/12610032</guid>
      <dc:creator>former_member808993</dc:creator>
      <dc:date>2022-06-16T18:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using context with calculated variables</title>
      <link>https://community.sap.com/t5/technology-q-a/using-context-with-calculated-variables/qaa-p/12610033#M4729507</link>
      <description>&lt;P&gt;The variable should look like this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;v_Amount&lt;/STRONG&gt;:    =Sum (If ([vClass] = 1 And [vPay] = 1 And [VPosition] = 1 And [vProfit] = 1 And [vTenure] = 1) Then 1 Else [Unmodified Amount]) ForEach ([Employee Key])&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2061534-r20220616-1.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;hope this is what you are looking for&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 20:32:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/using-context-with-calculated-variables/qaa-p/12610033#M4729507</guid>
      <dc:creator>ayman_salem</dc:creator>
      <dc:date>2022-06-16T20:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using context with calculated variables</title>
      <link>https://community.sap.com/t5/technology-q-a/using-context-with-calculated-variables/qaa-p/12610034#M4729508</link>
      <description>&lt;P&gt;I think my issue is the calculated green columns are measures and not dimensions. I made a sample webi report like you did with the values as dimensions and I'm getting the right results like you are.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2061545-image.png" /&gt;&lt;/P&gt;&lt;P&gt;When I remove Employee - Key and Profit Center and add count of profit center for each Employee - Key, ideally I should get the 2nd table below. But I'm getting the 3rd table.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2061548-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Making the measure a dimension doesn't work, I played around with making it a text so it doesn't auto sum but that's not working either. How can I get vProfit for each employee - key without it summing it up to 3.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 00:09:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/using-context-with-calculated-variables/qaa-p/12610034#M4729508</guid>
      <dc:creator>former_member808993</dc:creator>
      <dc:date>2022-06-17T00:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using context with calculated variables</title>
      <link>https://community.sap.com/t5/technology-q-a/using-context-with-calculated-variables/qaa-p/12610035#M4729509</link>
      <description>&lt;P&gt;For your second problem, do the following,&lt;/P&gt;&lt;P&gt;Define the following variable:&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;v_vProfit&lt;/STRONG&gt;:       =[vProfit]                           (type &lt;STRONG&gt;Dimension&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;v_vProfit_Count&lt;/STRONG&gt;:    =Count([Profit Center]) ForEach([Employee Key]; [v_vProfit])&lt;/P&gt;&lt;P&gt;then add [&lt;STRONG&gt;v_vProfit&lt;/STRONG&gt;] and [&lt;STRONG&gt;v_vProfit_Count&lt;/STRONG&gt;] to your table, and then hide the column [&lt;STRONG&gt;v_vProfit&lt;/STRONG&gt;]&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2062522-r20220617-1.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2062523-r20220617-2.jpg" /&gt;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;hope this is what you are looking for&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 03:33:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/using-context-with-calculated-variables/qaa-p/12610035#M4729509</guid>
      <dc:creator>ayman_salem</dc:creator>
      <dc:date>2022-06-17T03:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using context with calculated variables</title>
      <link>https://community.sap.com/t5/technology-q-a/using-context-with-calculated-variables/qaa-p/12610036#M4729510</link>
      <description>&lt;P&gt;Thank you, was able to resolve my issue. I made the BEx query key figure into a dimension in webi and was able to use context around it. &lt;/P&gt;&lt;P&gt;Thanks for your idea! Wouldn't have thought of making the Amount key figure a dimension.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 19:08:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/using-context-with-calculated-variables/qaa-p/12610036#M4729510</guid>
      <dc:creator>former_member808993</dc:creator>
      <dc:date>2022-06-20T19:08:24Z</dc:date>
    </item>
  </channel>
</rss>

