3 Replies Latest reply: Sep 10, 2012 12:38 PM by Eric Weiss RSS

    Fixed x-axis and sorting problem

      Hi all. So I have a chart where the X-axis dimension is text, not numeric values. On the x-axis, I have low, medium, and high, and on the y-axis I have a count(distinct ID) expression.

      I want the chart to display low, medium, and high, regardless of my selections. By default, if I select a category with only low records, the chart will get rid of the medium and high bars completely. I want it to show low, medium, and high, even if the values are zero.

      I went to the Presentation tab and unchecked "Suppress Zero-Values" and this got me halfway there. Now, all bars show up even if they're zero, but now the sorting is screwed up.

      So I wanted the bars to always show up as low, then medium, then high, in that order, so on the Sort tab I set it to sort by this expression:


      =if([LMH] = 'low', 1, if([LMH] = 'medium', 2, if([LMH] = 'high', 3)))


      This works under the default configuration, but when I suppress zero-values, the sorting gets screwed up. It shoves all the bars with zero values to the right, leaving the bars with values all the way to the left.

      Any ideas? Let me know if you have questions. Thanks!