Create Cumulative figure in HANA Graphical Calculation View
Hi All,
This is a document how you can create a cumulative calculation using HANA Graphical Calculation View. It is one of the easy example, but you can extend it to any complex scenario.
To Get Free HANA Clout system you can follow Free SAP HANA Server Access in Cloud – YouTube here.
I am creating a Simple file like this and our aim is to create the cumulative column as show bellow.
|
Product |
Annual Sales(USD) |
Cumulative Sum Sales |
|
1070 |
3600 |
3600 |
|
1050 |
336 |
3969 |
|
1020 |
220 |
4156 |
|
1060 |
192 |
4348 |
Step 1:
Create a CSV file mention above. The file is already attached in this portal.
Step 2:
Consume the CSV file in HANA and create a Table (Table Name: Zt_Sales_001).
Step 3:
Create a HANA Model / Calculation View name CA_DATA_ CUMULATIVE_001
Step 4:
Take a projection and consume the table you have created.
Step 5:
Create a DUMMY filed with a constant value like ‘1’ (As created in the system)
Step 6:
Then use a Rank Functionality to get the sequence number of the data.
Step 7:
Divided the flow into 2 different projections, and again join with DUMMY field. You will get M*N number of field.
Step 8:
Add 2 calculative column create with following logic. One is Equal to sequence and other is Greater than Equally of sequence. Please have the logic.
Step 9:
Put a filter with Value ‘Y’ on top of the Sequence Column.
Step 10:
Put an Aggregation node on top of Projection node (which has the Greater than Equally of sequence filter). Then Do the aggregation on top of total sales column.
Step 11:
Now Put a Join node and join Projection and aggression node and join on Product field.
Step 12:
Execute the field and see the output.
Please Let me know if you finding any issue here.














Are you using HANA cloud trail account for this?
Yes... You are right. Please let me know if there is any legal issue ... I am not aware of ..
Regards
Satrajit.
I am not sure any leagal issues are there, but i wanna know how can we use cloud trail account for hana native development.
Yes.. You can use the Cloud HANA System to Develop the Native HANA. You can have a look in this vedio.
Free SAP HANA Server Access in Cloud - YouTube
Nice article... !
Thanks...!!
Could you show me a whole flow in Scenario pain?
Hi Toshihisa,
I did not get you properly. Could you please enplane, what you would like know ?
Regards
Satrajit
Hi, good article.
Can you share complete calculation view diagram?
Thanks in advance.
Regards, I appreciate you can clarify what type of Join and cardinality should be performed in step 7 and 11Nice blog post ...thanks 🙂