Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

New table with design value

Hi All !


I have the following table:

     

RouteStringTerminalNameRouteLineNumberOperationName=sum(Volume)
A-B-C-DA1LOAD200
A-B-C-DB2UNLOAD100
A-B-C-DB2LOAD300
A-B-C-DC3UNLOAD100
A-B-C-DC3LOAD150
A-B-C-DD4UNLOAD450


I need to create a new table with the calculation of Total Volume = Volume(where RouteLineNumber -1) - Volume(unload) + Volume(load)

The final result for example above should be:

    

RouteStringTerminalNameRouteLineNumberTotal Volume
A-B-C-DA1200
A-B-C-DB2400
A-B-C-DC3450
A-B-C-DD40

Does anybody have some ideas how to manage the calculus?

Thanks a lot in advance for help!

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try a chart with your three dimensions  (RouteString, TerminalName, RouteLineNumber) and as expression:

=Rangesum(    

     Above(TOTAL Sum({<OperationName = {'LOAD'}>} Volume),0,rowno(TOTAL)),

-   Above(TOTAL Sum({<OperationName = {'UNLOAD'}>} Volume),0,rowno(TOTAL)),

)

View solution in original post

2 Replies
swuehl
MVP
MVP

Try a chart with your three dimensions  (RouteString, TerminalName, RouteLineNumber) and as expression:

=Rangesum(    

     Above(TOTAL Sum({<OperationName = {'LOAD'}>} Volume),0,rowno(TOTAL)),

-   Above(TOTAL Sum({<OperationName = {'UNLOAD'}>} Volume),0,rowno(TOTAL)),

)

Not applicable
Author

Thanks a lot!