# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
cancel
Showing results for
Did you mean:
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')))

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

Thank you & Best Regards.

1 Solution

Accepted Solutions
Partner - Contributor III

Hello,

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

If you are using HalfYear as dimension

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

Regards,

Vijayaganesh

2 Replies
Partner - Contributor III

Hello,

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

If you are using HalfYear as dimension

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

Regards,

Vijayaganesh

Contributor II
Author

Hi,

It worked, thank you!

Best Regards