Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
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