Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Talk to Experts Tuesday, Live Q&A, September 22: Moving from QlikView to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Re-ordering field values containing a space

Hoping someone can help. I've previously used the below script to re-order field values for charts I have to produce and it works fine. However, I now have a field value (Very Often) with a space and whilst the script will reorder the other values, it won't touch this one. I've tried single quotes, double quotes and brackets and none work. Any ideas?

tmploadorder:

load * Inline [

Memorising

'Very Often'

Often

Sometimes

Never

N/A

];

LOAD Institution,

     [Code Ref.],

     StageHEA,

     GenderHEA,

     DomicileHEA,

     ModeHEA,

     LevelHEA,

     AgeHEA,

     Memorising,

     Applying,

     Analysing,

     Evaluating,

     Forming,

     [Changes to work],

     [Challenged by course],

     [Prepared for sessions],

     [Worked with other students],

     [Explained course material],

     [Asked another student],

     [Prepared with other students],

     [Asked questions],

     [Discussed performance],

     [Talked about career],

     [Discussed ideas],

     [Worked with teaching staff]

FROM

(qvd);

DROP table tmploadorder;

Any help would be much appreciated.

Matt

1 Solution

Accepted Solutions
Highlighted
MVP & Luminary
MVP & Luminary

It should work without the quotes. My guess is that the value in the qvd has more than one space between the words?

-Rob

View solution in original post

8 Replies
Highlighted

It should work as is, have you tryed simply to leave

very often as is?

Highlighted
Creator
Creator

That's what I thought but I've tried but it won't update the value order on the chart I'm afraid.

M

Highlighted
MVP & Luminary
MVP & Luminary

It should work without the quotes. My guess is that the value in the qvd has more than one space between the words?

-Rob

View solution in original post

Highlighted
Creator
Creator

I've just checked and there is only a single space. This chart is starting to annoy me now.

Highlighted
MVP & Luminary
MVP & Luminary

Leading or trailing spaces? Different case? I find it useful to put values in a listbox with an expression like:

='>' & Memorising & '<'

to check for leading/trailing spaces.

-Rob

Highlighted
Creator
Creator

Thanks Rob, no spaces but I did spot that I had capitalised 'often'. Fixed that and it works!

Cheers,

Matt

Creator
Creator

Ok, new problem - I can't get the reorder to work with the [Prepared for session] field. I've tried without quotes, with single quotes, double quotes, square brackets and curly brackets with no luck.

Any ideas?

M

Highlighted
MVP & Luminary
MVP & Luminary

Reload but this time don't drop the temp table. Make a listbox of [Prepared for session] and see if you different variations of similar value.

-Rob