Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member182302
Active Contributor

Hi Folks,

As mentioned in this blog:

SAP HANA: Dynamic Ranking using Script based (SQL Script) Vs Graphical Calculation view Vs Script ba...

As requested in the above blog, collaborating with this document on the steps i have used to create the graphical view . Please do suggest your opinions to make it better.

Will explain the each node here on how we can build the graphical calculation view and get rank in it.

Projection 1 & 2 : We select the required columns i.e Employee Name,Region and Salary and create a "dummy" column with constant value 1 as shown below:

Join 1: ( Projection 1 & 2 joined on dummy column )

Aggregation 2 : ( Aggregate salary as "Minumum" and add "dummy" column to apply the group by )

Join 2 : ( Joining Aggregation 2 and Projection 1 on dummy column )

Projection 3 : ( Apply filter SALARY_1 < SALARY )

Aggregation 1: ( Add EMPLOYEE_NAME_1 as "Aggregated column" and apply Count on it  at EMPLOYEE NAME,REGION,SALARY level)

Projection 4: ( Add a calculated column Rank with formula RANK1 + 1  -- To get the ranks from 2)

Projection 6: ( Apply filter SALARY = MINUMUM and add it to Rank = 1 as calculated column )

Projection 7 & 5 : Choose the required columns i.e EMPLOYEE_NAME,REGION,SALARY and RANK

UNION_1 ( Map both Projection 7 & 5 in the union )

Now you can see in the data preview we can see the RANK column showing us the desired output.

Hope this navigations is clear.

Your's

Krishna Tangudu

13 Comments
Labels in this area