cancel
Showing results for 
Search instead for 
Did you mean: 

BW4HANA: How to hide a measure in a query depending on which node of the hierarchy we are in.

Guido_N
Newcomer
0 Kudos

Hello everyone!
I'm sharing a situation we're facing that we can't find a solution to. Any help is welcome.
Thanks in advance!

Tools:

  • BW4HANA:Guido_N_0-1712346333786.png
  • SAP Analytics Cloud (Live Model)

Problem:

We have the Customer dimension, which includes several measures, among them, Measure X. In SAC, a table is displayed with this Customer dimension, along with Measure X and others ones. This table has a specific hierarchy created in BW with multiple levels. All the measures in this table originate at the leaf level and are then summarized at different nodes levels within the hierarchy. Due to a specific business requirement, it's necessary to hide the Measure X for certain lower levels of the hierarchy, without affecting the values of their parent nodes. Additionally, we have the constraint of not being able to use a separate hierarchy or table as per the client's request. All of this needs to coexist alongside other measures, within the same hierarchy, and using the same dimension without altering anything beyond what is necessary. This change must necessarily be made on the BW/Query side, as making it within the SAC story wouldn't be useful for us.

Objective:

To modify the behavior of Measure X for the Customer dimension, specifically for a certain hierarchy. It's necessary to hide Measure X from view at lower levels of the hierarchy without using a new table, another dimension, or a different hierarchy from the one currently used.

Visual Example:

This is the current state of the table display:

Guido_N_4-1712346719129.png

And this is the desired display:

Guido_N_3-1712346704277.png

P.S. The level 4 would refer to the leaf level of the hierarchy.

Solutions attempted:

  • BW Query Designer: An attempt was made to implement logic where each node could be enumerated according to its level, and from there, restrict Measure X at the necessary levels (levels 3 and 4). In this case, as direct access to the hierarchy and its nodes wasn't possible, some nodes could not be categorized correctly due to the structure of the hierarchy and a few other issues (e.g., some level 4 nodes have 1 child, and others have more than 1). This attempt was carried out using the LEAF function, which allows us to distinguish leaf nodes of the hierarchy. The logic consisted of summarizing this LEAF value to distinguish in each case, at which levels of the hierarchy we were.
  • SAC Story (Live Model): Making this change at this level is not useful for us. However, since we also don't have the possibility to access and formulate with the hierarchy nodes, we couldn't find a way to solve this problem within the SAC story either.
  • Customer Exit: With this approach, we found that it's possible to dynamically select the nodes in which we want to hide Measure X. However, we encountered some limitations when configuring the displayed values for parent nodes and couldn't achieve the desired result. When hiding Measure X for all child nodes of a parent node, we found that we couldn't prevent the value for the parent node from also becoming 0. Therefore, instead of only hiding the value in child nodes, it also propagates to the parent nodes (e.g., hiding all level 3 nodes results in the value not being visible or being distorted in level 2 nodes).

 

SAP BW/4HANA 
BW SAP HANA Modeling Tools (Eclipse) 

Accepted Solutions (0)

Answers (0)