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: 
wangxusq
Contributor III
Contributor III

How to Sort master item and value

Hi All,

In Master Item:

1.jpg

Two question:

1.If we can not rename them ,I want to Sort :Year->Month

2.For Month field, I want to sort from Jan to Dec,not A-Z.

Any idea,thanks.

5 Replies
bhaskar_sm
Partner - Creator III
Partner - Creator III

Hi,

You can sort Month by using Pick Match Functions(PFB) in Sortby Expresstion under the listbox property and then you can add this to master item.

pick(Match(YourMonthField,'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'),1,2,3,4,5,6,7,8,9,10,11,12)

year.PNG

or you can achieve the same thing in backend- master calender using dual function PFB.

Dual(YourMonthField, YourMonthNumber)

I,e Dual(CalenderMonth, CMonth)

where Cmonth is Month(TempDate) as CMonth,

in a same way you can sort the year as well.


if you found this helpful,  please mark helpful or correct

Regards,

Bhasker Kumar

wangxusq
Contributor III
Contributor III
Author

Hi ,

Thanks for your response. I want to Add master-item(Dimension),because I need to use it by selection bar.

1.jpg.


For the first solution: field shows number not  Jan、Feb and so on.My client hope show Jan、Feb…

For the second solution,when I select Month field, I do not want to display YourMonthNumber on he selection bar.


Any Idea?


What's more, can I sort :Year-->Month. Year is at the first place. Of course maybe I have many filters, I want to sort them according to my idea.

jheasley
Luminary Alumni
Luminary Alumni

Try sorting the master item by its related date field using the custom expression then min(Date([DateField])) ascending or descending.

Capture1.JPGCapture2.JPG

wangxusq
Contributor III
Contributor III
Author

Hi ,

Thanks for your response. I need to create master-item(dimension). I find  when I use a expression in master item dimension.  The selection bar will not display it.  This is a bug?

RAMK
Partner - Contributor II
Partner - Contributor II

hello,

i came across the same issue, untick chart suggestions and you will see it.

 

Thanks.