Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Buliano
Contributor II
Contributor II

Quarter display and sorting

I need to display data per quarter in a Bar chart, sorted by quarter, and my quarters start in February.

 

The following dimension does it ok, and with correct sorting, but with a small issue:

QuarterName(QuarterlyReportDate,0,2)

The small issue is that the quarter starting in November is displayed as:

Nov-Jan 2022

While in fact it would be more clear if it was like:

Nov 2022- Jan 2023

 

Buliano_0-1656689467327.png

As an alternative, I am trying to use MonthName. This solves the issue, but creates one with the sorting:

MonthName(QuarterStart(QuarterlyReportDate,0,2)) & ' - ' & MonthName(QuarterEnd(QuarterlyReportDate,0,2))

In any quarter, the year is displayed for both months.

With just the first bit, sorting is correct: MonthName(QuarterStart(QuarterlyReportDate,0,2))

However, concatenating MonthName with something else makes Qlik unable to sort the quarters correctly. At least I can’t find a way to do so.

Buliano_1-1656689542106.png

Any help on how I could have the quarters correctly sorted and at the same time display the two years (at least for the quarter which is between two years)?

Thanks in advance

 

Labels (4)
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

Create a dual value field as below

DUAL( MonthName(QuarterStart(QuarterlyReportDate,0,2)) & ' - ' & MonthName(QuarterEnd(QuarterlyReportDate,0,2)) , floor(QuarterStart(QuarterlyReportDate,0,2)) ) as YourfieldName

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

1 Reply
vinieme12
Champion III
Champion III

Create a dual value field as below

DUAL( MonthName(QuarterStart(QuarterlyReportDate,0,2)) & ' - ' & MonthName(QuarterEnd(QuarterlyReportDate,0,2)) , floor(QuarterStart(QuarterlyReportDate,0,2)) ) as YourfieldName

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.