12 Replies Latest reply: Aug 16, 2017 7:19 PM by Gus Feltham RSS

    Qlik Sense bar chart legend sort required

    Gus Feltham

      I'm having trouble getting the legend to sort in the same way the data is for a chart:

      my load script includes dual function as below:

          IF("Est Vehicle speed during incident"='0-25 km',dual('0-25km/h',1),

          IF("Est Vehicle speed during incident"='25-50 km',dual('25-50km/h',2),

              IF("Est Vehicle speed during incident"='50-75 km',dual('50-75km/h',3),

              IF("Est Vehicle speed during incident"='75-100 km',dual('75-100km/h',4),

              IF("Est Vehicle speed during incident"='100-130 km',dual('100-130km/h',5))))))

       

      however the legend always shows with '75-100km/h' and '50-75km/h' in the wrong order i.e. I want ascending and the other values do show correctly in ascending order - I have it set under sorting to numerical/ascending. 

      The chart has a month dimension, and then the dimension above.  The only measure is a count of ID's to get number of instances..

      Please advise on options to try for this.  Thanks.