cancel
Showing results for 
Search instead for 
Did you mean: 

running total

millicentdark
Contributor
0 Kudos

Hi Experts,

Has anyone done a running total function in SAP HANA graphical calculation view?

below is my SQL running total but i want to do same in SAP HANA ;

any idea or steps to achieve this?

Regards

Justice

Accepted Solutions (0)

Answers (5)

Answers (5)

millicentdark
Contributor
0 Kudos

hi deepak,

below are exactly what i did; tell me if i missed something;

the column_2_1 did not perform the running total as expected.

millicentdark
Contributor
0 Kudos

Hi deepak,

i can not add filer in a projection.

Regards

Justice

Former Member
0 Kudos
  • Add a projection node, between the final level Semantic and Join. In this Node put the filter condition.

  • You need to add the TransID in both of underlying projections(where the base tables exist).

  • At the join node, pls dont join any fields( in the snapshot i observe that the debit and credit fields are mapped)

This is what i meant

Former Member
0 Kudos

Yes, you can achieve it graphically (but performance wise not the best approach).

Projection: Add the base table (Say A)

              Fields: ID, Value

Projection1: Add the base table (Say B)

              Fields: ID_1, Value_1


Join: Projection <Inner join> Projection1 ( Dont join any fields, with would produce N*N cardinality)


Projection: Put filter, ID<=ID_1


          This produce data like

         

IDVALUEID_1VALUE_1
110110
220110
220220
330110
330220
330330



Aggregation: insert VALUE_1 as aggregated column (deselect ID_1)


IDVALUEVALUE_1
11010
22030
32060



Regards,

Deepak


millicentdark
Contributor
0 Kudos

Hi Experts,

Any help on my request?

I will be glad if someone can assist me. attached is my  graphical calculation views and i will need help for my expected result.

SAP HANA GRAPHICAL CALCULATION VIEW

RAW DATA PREVIEW

EXPECTED RESULT

Running total column is my expected result for my SAP HANA calculated column name.

Former Member
0 Kudos

Just remove the ROWS UNBOUNDED PRECEEDING from your example, then it should work for SAP HANA.

millicentdark
Contributor
0 Kudos

hi Martin,

i am using a graphical calculation view. How do i add that in SAP HANA. what particular function should i use?