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

Sort date according to half yearly

Dear Experts,

I use my date field to plot a bar graph which classify into Half Yearly (eg. 2H19 = 2nd half of 2019)

Below is the expression used.

=If(Match([ProdnDate.autoCalendar.YearMonth], '2019-Jul', '2019-Aug', '2019-Sep', '2019-Oct', '2019-Nov', '2019-Dec'), '2H19',
If(Match([ProdnDate.autoCalendar.YearMonth], '2019-Jan', '2019-Feb', '2019-Mar', '2019-Apr', '2019-May', '2019-Jun'), '1H19',
If(Match([ProdnDate.autoCalendar.YearMonth], '2020-Jan'), '1H20')))

Capture.PNG

Any idea how to sort the bar accordingly ? 1H19 followed by 2H19 followed by 1H20

Thank you & Best Regards.

 

1 Solution

Accepted Solutions
vijayaganesh_s
Partner - Contributor III
Partner - Contributor III

Hello,

Please use Sort by Expressions option to sort as per your requirement.

Use the below exp... It may help you

If you are using HalfYear as dimension

NUM#(RIGHT(YourDim,2)&LEFT(YourDim,1))

Regards,

Vijayaganesh

View solution in original post

2 Replies
vijayaganesh_s
Partner - Contributor III
Partner - Contributor III

Hello,

Please use Sort by Expressions option to sort as per your requirement.

Use the below exp... It may help you

If you are using HalfYear as dimension

NUM#(RIGHT(YourDim,2)&LEFT(YourDim,1))

Regards,

Vijayaganesh

NewUser1
Contributor II
Contributor II
Author

Hi,

It worked, thank you!

Best Regards