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: 
techvarun
Specialist II
Specialist II

Sort By Expression

Hello Qlikxperts

                             I have three waterfall charts with five expressions each Like

                   Actual

                   Zone1

                   Zone2'

                   Zone3

                   Budget

                      

                              My problem here is i need to show the waterfall sort order dynamically

if the value of

                    Zone1 = 10

                   Zone2 = 100

                   Zone3  = 5 Then my order of expression appearance should be

  Actual

                   Zone2

                   Zone1

                   Zone5

                   Budget

if the value of

                    Zone1 = 25

                   Zone2 = -50

                   Zone3  = 6 Then my order of expression appearance should be

  Actual

                   Zone1

                   Zone3

                   Zone2

                   Budget

Please advice any ways to acheive the above logic

Thanks

Varun

1 Reply
tresesco
MVP
MVP

If you are looking for rearranging the expressions order, try using 'MoveExpression' method in a macro like:

'rem create new straight table and switch places of expression columns
set chart = ActiveDocument.Sheets("Main").CreateStraightTable
chart.AddDimension "ProductType"
chart.AddExpression "sum(Amount)"
chart.AddExpression "count(Product)"
chart.MoveExpression 1,0