<?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: Aggregating data with Data Actions in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/aggregating-data-with-data-actions/qaa-p/12723454#M4774822</link>
    <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;chaznosterous&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The reason its not affecting any row is because DATA() and RESULTLOOKUP() only work for base members of dimension. The test attributes has values like ZHIFI and ZFURNITURE which are parent nodes and hence cannot be written back to. If you maintain a base member as attribute value in test it will work.&lt;/P&gt;&lt;P&gt;If you maintain a base member (ZHIFI_D, ZFURNITURE_D etc. ) as attribute value in test it will work.&lt;/P&gt;&lt;P&gt;You need to create this property values also as member first.&lt;/P&gt;&lt;P&gt;Below is the syntax of DATA() and it only accepts leaf members as id/property/parameter/variable member.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA([&amp;lt;measures/dimension&amp;gt;=&amp;lt;member_id&amp;gt;,...],[&amp;lt;date_dim&amp;gt;=&amp;lt;date_scope_function&amp;gt;])&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;member_id&amp;gt; ::= { &amp;lt;leaf_member&amp;gt; | &amp;lt;#VARIABLEMEMBER&amp;gt; | &amp;lt;parameter_single_leaf&amp;gt; | &amp;lt;dimension&amp;gt; | [&amp;lt;linked_model&amp;gt;.]&amp;lt;dimension&amp;gt; | [&amp;lt;linked_model&amp;gt;.]&amp;lt;dimension&amp;gt;.&amp;lt;property&amp;gt; | ELIMMEMBER() }&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hope this helps !!&lt;/P&gt;&lt;P&gt;Nikhil&lt;/P&gt;</description>
    <pubDate>Tue, 24 Jan 2023 10:16:03 GMT</pubDate>
    <dc:creator>N1kh1l</dc:creator>
    <dc:date>2023-01-24T10:16:03Z</dc:date>
    <item>
      <title>Aggregating data with Data Actions</title>
      <link>https://community.sap.com/t5/technology-q-a/aggregating-data-with-data-actions/qaq-p/12723453</link>
      <description>&lt;P&gt;Hi experts,&lt;/P&gt; 
  &lt;P&gt;I am currently trying to solve a simple problem for a planning solution, where I have a hierarchy (parent/child) on a dimension, and I want to use a data action to copy values to a different version. The problem arises because I want to aggregate on hierarchy node above the leaf members.&lt;/P&gt; 
  &lt;P&gt;Below is a dummy data version of what I am trying to achieve, but follows the same pattern.&lt;/P&gt; 
  &lt;P&gt;I have been using the following script:&lt;/P&gt; 
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2131948-data-action-script.png" /&gt;&lt;/P&gt; 
  &lt;P&gt;On the following material dimension:&lt;/P&gt; 
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2131949-material-dimension.png" /&gt;&lt;/P&gt; 
  &lt;P&gt;In the script I am using the property “test” to assign the data. But when I run the data action, nothing is assigned and examining the data action monitor, I can see no rows are affected.&lt;/P&gt; 
  &lt;P&gt;I would expect to see the value of amount being assigned to the hierarchy levels TOTAL, ZFURNITURE and ZHIFI.&lt;/P&gt; 
  &lt;P&gt;I have tried to copy all the Member ID’s to the “test” property, which works, but assigns all the data to the leaf levels. I have also tried only keeping the values for TOTAL, ZFURNITURE and ZHIFI in the “test” property, but to no effect.&lt;/P&gt; 
  &lt;P&gt;Does anyone have some pointers in terms of aggregation with Data Actions?&lt;/P&gt; 
  &lt;P&gt;Best regards,&lt;/P&gt; Rasmus</description>
      <pubDate>Tue, 24 Jan 2023 09:50:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/aggregating-data-with-data-actions/qaq-p/12723453</guid>
      <dc:creator>chaznosterous52</dc:creator>
      <dc:date>2023-01-24T09:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating data with Data Actions</title>
      <link>https://community.sap.com/t5/technology-q-a/aggregating-data-with-data-actions/qaa-p/12723454#M4774822</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;chaznosterous&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The reason its not affecting any row is because DATA() and RESULTLOOKUP() only work for base members of dimension. The test attributes has values like ZHIFI and ZFURNITURE which are parent nodes and hence cannot be written back to. If you maintain a base member as attribute value in test it will work.&lt;/P&gt;&lt;P&gt;If you maintain a base member (ZHIFI_D, ZFURNITURE_D etc. ) as attribute value in test it will work.&lt;/P&gt;&lt;P&gt;You need to create this property values also as member first.&lt;/P&gt;&lt;P&gt;Below is the syntax of DATA() and it only accepts leaf members as id/property/parameter/variable member.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA([&amp;lt;measures/dimension&amp;gt;=&amp;lt;member_id&amp;gt;,...],[&amp;lt;date_dim&amp;gt;=&amp;lt;date_scope_function&amp;gt;])&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;member_id&amp;gt; ::= { &amp;lt;leaf_member&amp;gt; | &amp;lt;#VARIABLEMEMBER&amp;gt; | &amp;lt;parameter_single_leaf&amp;gt; | &amp;lt;dimension&amp;gt; | [&amp;lt;linked_model&amp;gt;.]&amp;lt;dimension&amp;gt; | [&amp;lt;linked_model&amp;gt;.]&amp;lt;dimension&amp;gt;.&amp;lt;property&amp;gt; | ELIMMEMBER() }&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hope this helps !!&lt;/P&gt;&lt;P&gt;Nikhil&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 10:16:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/aggregating-data-with-data-actions/qaa-p/12723454#M4774822</guid>
      <dc:creator>N1kh1l</dc:creator>
      <dc:date>2023-01-24T10:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating data with Data Actions</title>
      <link>https://community.sap.com/t5/technology-q-a/aggregating-data-with-data-actions/qaa-p/12723455#M4774823</link>
      <description>&lt;P&gt;Hi Nikhil,&lt;/P&gt;&lt;P&gt;Thanks for the advice, I tired implementing what you suggested, but I think I might be misunderstanding you (and the documentation)?&lt;/P&gt;&lt;P&gt;Do you mean updating the members of the Material dimension with the ZHIFI_D, ZFURNITURE_D and ZTOTAL_D? Like so:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2131966-material-updated.jpg" /&gt;&lt;/P&gt;&lt;P&gt;This makes the script aggregate on the ZHIFI_D, ZFUR_D and ZTOTAL_D for my budget version. However this makes it unviable for disaggregation on the original leaf members, plus they do not display on the rows in a story.&lt;/P&gt;&lt;P&gt;My objective is to aggregate to the ZTOTAL, ZHIFI and ZFURNITURE level and leave the underlying leaf members blank.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Rasmus&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 12:53:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/aggregating-data-with-data-actions/qaa-p/12723455#M4774823</guid>
      <dc:creator>chaznosterous52</dc:creator>
      <dc:date>2023-01-24T12:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating data with Data Actions</title>
      <link>https://community.sap.com/t5/technology-q-a/aggregating-data-with-data-actions/qaa-p/12723456#M4774824</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You need to have an alternative hierarchy where the members you want to use as the aggregated level are actually leaf members.&lt;/P&gt;&lt;P&gt;Then you have to set this hierarchy on the data action script, using the global definition CONFIG.HIERARCHY = [d/Dimension].[h/Hierarchy].&lt;/P&gt;&lt;P&gt;This is the only way to write in a node hierarchy member, turning it into a leaf member in a secondary hierarchy, and making sure the data action recognize it as such.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 13:52:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/aggregating-data-with-data-actions/qaa-p/12723456#M4774824</guid>
      <dc:creator>marcelo_portella76</dc:creator>
      <dc:date>2023-01-24T13:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating data with Data Actions</title>
      <link>https://community.sap.com/t5/technology-q-a/aggregating-data-with-data-actions/qaa-p/12723457#M4774825</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;marcelo_portella&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have tried this approach but for some reason it still does not work. I had seen this example in OpenSAP course but could not get it to work.&lt;/P&gt;&lt;P&gt;Also explained here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/docs/SAP_ANALYTICS_CLOUD/00f68c2e08b941f081002fd3691d86a7/1679129715024574b7bbb4a611471765.html" target="_blank"&gt;https://help.sap.com/docs/SAP_ANALYTICS_CLOUD/00f68c2e08b941f081002fd3691d86a7/1679129715024574b7bbb4a611471765.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Product Dimension Setup:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2132055-image.png" /&gt;&lt;/P&gt;&lt;P&gt;AF Data Action:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;CONFIG.TIME_HIERARCHY = CALENDARYEAR
CONFIG.GENERATE_UNBOOKED_DATA = OFF
CONFIG.HIERARCHY= [d/NA_SAP_CEP_PRODUCT].[h/H2] // set to alternate hier

MEMBERSET [d/Measures] = "AMOUNT"
MEMBERSET [d/Date] = "202201"
MEMBERSET [d/NA_SAP_CEP_PRODUCT].[p/BRAND]="P0"

DATA([d/NA_SAP_CEP_PRODUCT]=[d/NA_SAP_CEP_PRODUCT].[p/BRAND]) = RESULTLOOKUP([d/Version]="public.Actual")&amp;lt;br&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2131973-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Data Action Log: It shows 0 records affected.&lt;/P&gt;&lt;P&gt;Nikhil&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 14:11:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/aggregating-data-with-data-actions/qaa-p/12723457#M4774825</guid>
      <dc:creator>N1kh1l</dc:creator>
      <dc:date>2023-01-24T14:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating data with Data Actions</title>
      <link>https://community.sap.com/t5/technology-q-a/aggregating-data-with-data-actions/qaa-p/12723458#M4774826</link>
      <description>&lt;P&gt;Hi Marcelo,&lt;/P&gt;&lt;P&gt;I have now tried what you suggested, but to no effect:&lt;/P&gt;&lt;P&gt;Material dimension:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2132030-material-dimension-agghier-v1.jpg" /&gt;&lt;/P&gt;&lt;P&gt;DA script:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CONFIG.HIERARCHY = [d/Material].[h/H2] //AGG_hierachy in material dimension&lt;BR /&gt;MEMBERSET [d/MEASURE] = "Amount"&lt;BR /&gt;DATA([d/Material] = [d/Material].[p/P2D]) = RESULTLOOKUP([d/Version] = "public.Actual") //P2D = AGG_PROP2 property in material dimension&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Resulting story with changed hierachy:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2132032-planning-story-after-da-v1.jpg" /&gt;&lt;/P&gt;&lt;P&gt;Again this does not fit the case where you want to aggregate to the node above the leaf members and use another dimension to be the driver for distribution for the budget for instance.&lt;/P&gt;&lt;P&gt;Can you give an example of a dimension setup where this would work?&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Rasmus&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 10:06:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/aggregating-data-with-data-actions/qaa-p/12723458#M4774826</guid>
      <dc:creator>chaznosterous52</dc:creator>
      <dc:date>2023-01-25T10:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating data with Data Actions</title>
      <link>https://community.sap.com/t5/technology-q-a/aggregating-data-with-data-actions/qaa-p/12723459#M4774827</link>
      <description>&lt;P&gt;It seems the base level members that have data are not on you secondary hierarchy at all, so they are not read by the script when you define to step to use that particular hierarchy.&lt;/P&gt;&lt;P&gt;They should be at least root. You can make sure you are picking them by using the memberset filter. You can define a hier node to hold all basemembers as well.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 12:49:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/aggregating-data-with-data-actions/qaa-p/12723459#M4774827</guid>
      <dc:creator>marcelo_portella76</dc:creator>
      <dc:date>2023-01-25T12:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating data with Data Actions</title>
      <link>https://community.sap.com/t5/technology-q-a/aggregating-data-with-data-actions/qaa-p/12723460#M4774828</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;marcelo_portella&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I added the P1, P2, P3 members also as root in the second hierarchy but for some reason it does not write anything. Even scoping the products explicitly did not work. Not sure if I am still missing something.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2132057-image.png" /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CONFIG.TIME_HIERARCHY = CALENDARYEAR
CONFIG.GENERATE_UNBOOKED_DATA = OFF
CONFIG.HIERARCHY= [d/NA_SAP_CEP_PRODUCT].[h/H2]

MEMBERSET [d/Measures] = "AMOUNT"
MEMBERSET [d/Date] = "202201"
MEMBERSET [d/NA_SAP_CEP_PRODUCT]=("P1","P2","P3")
MEMBERSET [d/NA_SAP_CEP_ACCOUNT]="GROSS_SALES"

DATA([d/NA_SAP_CEP_PRODUCT]=[d/NA_SAP_CEP_PRODUCT].[p/BRAND]) = RESULTLOOKUP([d/Version]="public.Actual")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Nikhil&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 14:04:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/aggregating-data-with-data-actions/qaa-p/12723460#M4774828</guid>
      <dc:creator>N1kh1l</dc:creator>
      <dc:date>2023-01-25T14:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating data with Data Actions</title>
      <link>https://community.sap.com/t5/technology-q-a/aggregating-data-with-data-actions/qaa-p/12723461#M4774829</link>
      <description>&lt;P&gt;Hi friends.&lt;/P&gt;&lt;P&gt;It works here like this:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2130984-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/2130985-image.png" /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CONFIG.TIME_HIERARCHY = CALENDARYEAR
CONFIG.GENERATE_UNBOOKED_DATA = ON
CONFIG.HIERARCHY = [d/Product].[h/AltHier]

MEMBERSET [d/Measures] = "Value"
MEMBERSET [d/Date] = "202301"
MEMBERSET [d/Product] = BASEMEMBER([d/Product].[h/AltHier] , "Leaf")

DATA([d/Product]=[d/Product].[p/Group]) = RESULTLOOKUP([d/Version]="public.Actual")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 17:24:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/aggregating-data-with-data-actions/qaa-p/12723461#M4774829</guid>
      <dc:creator>marcelo_portella76</dc:creator>
      <dc:date>2023-01-27T17:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating data with Data Actions</title>
      <link>https://community.sap.com/t5/technology-q-a/aggregating-data-with-data-actions/qaa-p/12723462#M4774830</link>
      <description>&lt;P&gt;Hi Marcelo,&lt;/P&gt;&lt;P&gt;Got a chance to test this today and this works, thanks for clarifying this.&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Rasmus&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 08:31:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/aggregating-data-with-data-actions/qaa-p/12723462#M4774830</guid>
      <dc:creator>chaznosterous52</dc:creator>
      <dc:date>2023-02-06T08:31:06Z</dc:date>
    </item>
  </channel>
</rss>

