Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Uploads getting stuck in the virus scanner. We are investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Partner
Partner

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
Highlighted
Partner
Partner

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

Highlighted
Contributor II
Contributor II

Hi,

It worked, thank you!

Best Regards