Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Sorting via formula problem

dear all

Sorting.jpg

I try and try to get it work, but unfortunatly I have little success.

I have a date and a number as a joined dimension. I want the dimension to be sorted like this:

12.07.2012_3

12.07.2012_1

12.07.2012_2

13.07.2012_3

13.07.2012_1

13.07.2012_2

Im using a formula to sort the date (the result of it you can see above(Figure)) :

 

if(Schicht = 3, CalDate&1,if(Schicht = 1,CalDate&2,if(Schicht = 2,CalDate&3)))

Any ideas ??

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Found the solution:

 

if(Schicht = 3, Num(CalDate)&1,if(Schicht = 1,Num(CalDate)&2,if(Schicht = 2,Num(CalDate)&3)))

thx all

View solution in original post

6 Replies
vivientexier
Partner - Creator II
Partner - Creator II

It would be easier to create in the script another column to sort your dimension.

SunilChauhan
Champion
Champion

in charts properties-> sort

check on expression and enter

if(Schicht = 3, CalDate&1,if(Schicht = 1,CalDate&2,if(Schicht = 2,CalDate&3)))

and select ascending or descending there.

Hope this helps

Sunil Chauhan
Anonymous
Not applicable
Author

I don't understand you:

     - Well the formula is entered already, but shows me not what I want.  See orig post

Anonymous
Not applicable
Author

That would be a possibility, but I'm curious if QlikView is that flexible that I can solve it also in a formula...

Anonymous
Not applicable
Author

I ve tried also this , but without success :

CalDate& if(Schicht = 3, 1,if(Schicht = 1, 2,if(Schicht = 2, 3)))

Anonymous
Not applicable
Author

Found the solution:

 

if(Schicht = 3, Num(CalDate)&1,if(Schicht = 1,Num(CalDate)&2,if(Schicht = 2,Num(CalDate)&3)))

thx all