Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating multiple inline functions

Hi

I am trying to load multiple files in qlikview.

I need to sort three dates field based on the month.

When i create one inline function then only one date field is sorted and other two are not.

When i create multiple inline function then it goes into a loop and the file goes for a toss

Can someone help me with the exact process of sorting multiple date(month) column

7 Replies
swuehl
MVP
MVP

Hi,

you try to sort the fields in script?

Could you post the script here, please? It is much easier to help if we see what you are talking about.

You could also post your QlikView application, if you want and if you think it is helpful.

Stefan

Not applicable
Author

LOAD * INLINE [

    TF_Fill Position Month, Value,

    November, 1

    December, 2

    January, 3

    Feburary, 4

    March, 5

    April, 6

    May, 7

    June, 8

    July, 9

    August, 10

    September, 11

    October, 12

    ];

LOAD * INLINE [

    TF_Open Position Month, Value,

    November, 1

    December, 2

    January, 3

    Feburary, 4

    March, 5

    April, 6

    May, 7

    June, 8

    July, 9

    August, 10

    September, 11

    October, 12

    ];

swuehl
MVP
MVP

Hi,

I couldn't see your sort functions in your example give, so could you add them, please?

If you load the two tables, you will get an association between the two "Value" columns, is this intended.

Then, I guess you want to sort Month name like January to December, the problem here is that these are string literals, not numerical values, so we need to get a method to tell QlikView the correct order (just sorting the literals would start with April, ...).

So we might need to add a column for sort order.

Stefan

Not applicable
Author

Hi Stefan

To put it in simple way i want to sort two month columns.

When the month name is displayed in Qlikview it should follow the calendar sequence.

Can you please help me with the procedure how do i get it in qlikview

nagaiank
Specialist III
Specialist III

Try loading these as dual fields, as given below

LOAD dual(string,numrep) as [TF_Fill Position Month]

INLINE [

    string, numrep

    November, 1

    December, 2

    January, 3

    Feburary, 4

    March, 5

    April, 6

    May, 7

    June, 8

    July, 9

    August, 10

    September, 11

    October, 12

    ];

LOAD dual(string,numrep) as [TF_Open Position Month]

INLINE [

    string, numrep

    November, 1

    December, 2

    January, 3

    Feburary, 4

    March, 5

    April, 6

    May, 7

    June, 8

    July, 9

    August, 10

    September, 11

    October, 12

    ];

Hope this helps.

swuehl
MVP
MVP

Hi naveenkumar3000,

to be sorted in calendar sequence and to hold the additonal value column, I think it should be like this

LOAD dual([TF_Fill Position Month],MonthOrder) as [TF_Fill Position Month]

, value

INLINE [

     TF_Fill Position Month, value, MonthOrder

     November, 1, 11

     December, 2, 12

     January, 3, 1

     Feburary, 4, 2

     March, 5,3

     April, 6,4

     May, 7, 5

     June, 8,6

     July, 9, 7

     August, 10, 8

     September, 11, 9

     October, 12, 10

     ];

LOAD dual([TF_Open Position Month],MonthOrder) as [TF_Open Position Month]

, value

INLINE [

     TF_Open Position Month, value, MonthOrder

     November, 1, 11

     December, 2, 12

     January, 3, 1

     Feburary, 4, 2

     March, 5, 3

     April, 6, 4

     May, 7, 5

     June, 8, 6

     July, 9, 7

     August, 10, 8

     September, 11, 9

     October, 12, 10

     ];

With dual, you could use numerical sort on the field, but still use the string for representation. Please have a look at the dual function in manual.

In any table or list box, you could then sort the field in calendar sequence.

Please note, that value fields are linking the both tables. If that is not intended, rename one of them (or both, e.g. to valueOpen and valueFill).

Regards,

Stefan

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You can also just load the Months in the order you want them to sort and use "Load Order" for the sort order in your charts.

-Rob