Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Specialist
Specialist

Sort and display dimension when value is null

Greetings Qlikview Experts,

I have created a bar chart based on the dimension Enrollment Status.  There are only 3 values to this dimension.  Employee, Spouse and Children.  I would like this to be the sort order so I created the formula below in the sort expression box.

Everything works great until the spouse dimension value is null.  I can choose show all values in the dimension properties and it shows up at the end of my chart.  I have a corresponding straight table that I use as well and I get the same incorrect result.  Since children has a covered live, value it is not null.   I use covered lives as a first expression in the bar chart, but I am not displaying it.

I have tried using a calculated dimension and I still can't get it to display properly

How can I ALWAYS display all of my dimensions values in the order I want, regardless of nulls.

Chart with null dimension.PNGchart with null dimension sort.PNG

Chart with null dimension straight table.PNG

Tags (2)
1 Solution

Accepted Solutions
Highlighted

Re: Sort and display dimension when value is null

Use this on the sort tab of the chart properties

View solution in original post

5 Replies
Highlighted

Re: Sort and display dimension when value is null

Try this:

=Match(Only({1} [Enrollment Status], 'Employee', 'Spouse', 'Children')


=Match(Only({1} [Enrollment Status]), 'Employee', 'Spouse', 'Children')


UPDATE: Missed a parenthesis

Highlighted
Specialist
Specialist

Re: Sort and display dimension when value is null

That formula in a calculated dimension field, displays the error message  // error in calculated dimension and only shows me the Employee value bar

Highlighted

Re: Sort and display dimension when value is null

Use this on the sort tab of the chart properties

View solution in original post

Highlighted
Specialist
Specialist

Re: Sort and display dimension when value is null

Yes.  That solves my sort order issue as long as I have show all values checked in the dimension properties.  Thanks for your help

Highlighted

Re: Sort and display dimension when value is null

Aweomse

I am glad it helped.

Best,

Sunny