cancel
Showing results for 
Search instead for 
Did you mean: 

Window function(OVER) equivalent in calculation view

Former Member
0 Kudos

Hi All,

I am trying to find a equivalent function that can replicate window function in calculation view.

Below are SQL that I am trying to replicate in Hana View

SELECT CATEGORY, ITEM, SUM(SALES) OVER (ORDER BY SALES) as CumulativeSales, 0 as TotalSales FROM SALES

The script above basically doing a running total on sales.

Raw Data

Expected result

Anyone have any idea what's the equivalent of "OVER" in calculation view?

Regards,

Kang

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kang,

Just trying to understand end to end business requirement here.

If your front end is BO, the sort functionality can be handled within BO. If you are looking to analyze the data within HANA, you can execute similar SQL against the calculation view.

Does this help?

Thanks,

Krishnan.

Answers (2)

Answers (2)

chandan_praharaj
Contributor
0 Kudos

Hi Kang,

Here to leverage this functionality, you have to use Script based Calculation View. If you are asking about this functionality in Graphical, It is not possible.

So Suggest you to use the Script based calc view.

You can check the below document, if you find some similarity with that.

former_member226419
Contributor
0 Kudos

Hi,

I dont know what you are up to. You can use a scripted calculation view and insert this code in your calculation view and do the same. Are you trying to do the same in graphical view and if yes, i dont think so.

BR

Sumeet