cancel
Showing results for 
Search instead for 
Did you mean: 

Calculated measure in a hierarchy of measures inside an Analytical model in the Data Sphere

hadar_k
Explorer
0 Kudos
273

Hi Hi,

I would like to create an analytical model inside the data sphere product. 

I have three measures, lets say Gross Sales, Net Sales, Tax. 

there is a logic between these measures. meaning, Gross Sales minus (-) the Tax = Net Sales.

so, the idea is to generate a model with one Level based measure. or a Hierarchy level. where I show the Gross Sales as the primary measure and the other two should be "sons" measures inside of it. 

when I open the Gross Sales, I get the to other measures. that sum up to it. and I will see the NetSales and the Tax as two measures inside the Gross Sales. 

similar to a financial report. where one measure is the SUM of all other measures and it is built as a Tree, or a Hierarchy of measures. 

sorry in advance if this is a newbie question, but would love any assistance in this kind of design in the DataSphere product. 

 

View Entire Topic
Sapdsbob
Newcomer
0 Kudos

SAP Datasphere: Analytical Model with Hierarchical Measures
### Step 1: Create a Graphical View (Data Model)
1. Open SAP Datasphere and navigate to "Data Builder".
2. Click "New Graphical View" and select your source data (e.g., a table containing Gross Sales, Net Sales, and Tax3. Drag the required columns (measures):
- Gross Sales
- Net Sales
- Tax
4. Save the view and expose it for consumption.
### Step 2: Create an Analytical Model
1. Go to "Data Builder" -> "New Analytical Model".
2. Choose the Graphical View you just created as the source.
3. Define measures:
- Gross Sales (Primary Measure)
- Net Sales (Child Measure)
- Tax (Child Measure)
4. Go to "Hierarchy Settings" and create a Level-based Hierarchy.
### Step 3: Configure a Hierarchical Measure
In the Analytical Model settings:
1. Navigate to "Measures" -> "Hierarchy"
2. Create a Hierarchy and define:
- Parent Node: Gross Sales
- Child Nodes: Net Sales, Tax
3. Define aggregation behavior (Summation) to ensure Net Sales + Tax = Gross Sales.
### Step 4: Save and Deploy the Analytical Model
1. Save the analytical model.
2. Deploy the model to make it available for consumption in SAP Analytics Cloud (SAC) or other reporting tools.
3. Test it in a report to see Gross Sales as an expandable measure, showing Net Sales and Tax underneath.
### Expected Hierarchical Output in Reports
Sales Report View:
Gross Sales: 100,000
- Net Sales: 80,000
- Tax: 20,000
### Next Steps & Enhancements
- Add filters & parameters for different sales regions.
- Connect the model to SAP Analytics Cloud (SAC) for visualization.
- Implement currency conversions if required.

i hope this will helps

Martin_Kuma
Active Participant
0 Kudos

Can you please drop some screen shots how did you manage to create a hierarchy in a FACT view? 

Also do please drop some screen shots in the model preview with the hierarchy of the measures. 

Thanks, Martin

hadar_k
Explorer
0 Kudos
Maybe I'm missing something, but there is no "4. Go to "Hierarchy Settings" and create a Level-based Hierarchy." in my GV or Analytical Model