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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out 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!

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

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
Champion III
Champion III

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!