Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem in sorting Fiscal month

Hi all

In a line chart i want to sort month from april to march

X axis - month

Y axis(Sales)=Sum({<SALES_DATE=,YEAR=,MONTH=,QUARTER=,FiscalYear=,WEEK=>}NET_AMOUNT)

I used Sort expression like this for sorting in sort tab--> expression

=Match(MONTH,'Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec','Jan','Feb','Mar')

I am not using master calendar but i am using calender object for date(SALES_DATE)

My problem is when there is no date selected in calender object its working fine(Fig1).But its not working when some date is selected(Fig 2)

sample1.PNG

sample2.PNG

I dont know whats happening.

Can anyone help me how can i solve this

1 Solution

Accepted Solutions
Not applicable
Author

Thank you all for your help

I dont know what the problem is but i fixed the problem by using alternate state so it remains same whatever i select.

View solution in original post

8 Replies
Not applicable
Author

go to chart properties and under sort tab click on dimension month and uncheck all the sort order and check Load order option,this will sort your month correctly    

Not applicable
Author

Hi Bhawna

Its not working.

Not applicable
Author

Anyone pls Help me to solve this

Not applicable
Author

Not only calendar date even when i select month or quarter also its not working

israrkhan
Specialist II
Specialist II

i think you have to use pick() function with match()..

like below

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


or second option is , generate a table in script like below..


load * Inline [

MONTH, Number

Apr,1

May,2

Jun,3

Jul,4

Aug,5

Sep,6

Oct,7

Nov,8

Dec,9

Jan,10

Feb,11

Mar,12

];

it will link automatically to your month field, and than in the sort table, sort it as "Numeric value"


hope it helps...

aveeeeeee7en
Specialist III
Specialist III

Use this Expression:

=Dual(MONTH,Match(MONTH,'Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec','Jan','Feb','Mar'))

Regards

Aviral Nag

Not applicable
Author

Thank you all for your help

I dont know what the problem is but i fixed the problem by using alternate state so it remains same whatever i select.

Charlie007
Contributor
Contributor

Please share the solution of this issue  as I am facing same problem when the data of future period does not exist. I am waiting for your reply and hope to receive it soon.