Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello QlikView experts,
I am writing to understand the behavior of bar chart dimension sorting based on the value of calculated expressions used in it. I've attached 2 screenshots to illustrate the challenge I am facing. In the chart properties > Sort tab I am using the same expression as the one in the Expressions tab to get the data sorted in descending order. Data is not getting sorted using that expression and I guess this could be because the expression is a combination of variables and previous columns. Not sure if QlikView is not establishing the relation of this calculated expression value w.r.t the dimension in the chart. Hope the attached screenshots help explain the situation.
In the screenshot you will see how I am using first 6 expressions but not displaying them. The last 2 expressions are having bar option selected for display and the value for these last 2 expression comes from the previous 6 expressions.
Could there be a different approach to this? To get the chart sorted on the expression value, how to go about it?
Thanks
And if you change the order of expressions? Sorting by Y-value sorts by values of first expresion, even though it is not displayed.
in the expresion on Sorting label put this:
=only({1} match(your expression))
Hi,
Did you try sorting by value instead of sorting by expression?
Thanks for the reply Enrique! I tried your expression but it keeps saying error in expression and I do not get the sorting done.
Hi Nannyogg, Yes I tried both Y value and Numeric value sort. But it is not sorting the data.
And if you change the order of expressions? Sorting by Y-value sorts by values of first expresion, even though it is not displayed.
This did the trick! First I was getting all -ve values but I guess it was because of some calculation errors at my side and selection criteria. I tried it one more time, by changing the order of expressions (expression that I need sorting on is first in the chart expression list). As of now I believe this is working! Thanks nannyogg