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

MATCH function showing month number instead of month name?

Hi All,

Hoping someone can assist... I'm trying to show my fiscal year order of months in a Pivot Table object.

 

My Dimension is :

=MATCH(month(LATEST_START_DATE) ,'Oct','Nov','Dec','Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep')

 

My Measures are the below for each FY:

count(

if(MATCH(DATE(LATEST_START_DATE, 'YYYY-MMM'), '2016-Oct', '2016-Nov', '2016-Dec','2017-Jan', '2017-Feb', '2017-Mar', '2017-Apr', '2017-May', '2017-Jun', '2017-Jul','2017-Aug', '2017-Sep'), [EMPLOYEE_NUMBER.HIRES]))

 

My table is showing October as "1"... any idea how I can get it read "Oct" or "October"? Please see attached screenshot.

 

Thank you!!!

 

1 Solution

Accepted Solutions
eknezo24
Contributor II
Contributor II
Author

I FIGURED IT OUT!  Woo!

 

Dimension = month(LATEST_START_DATE)

Measure = the same as before

Sort by Expression Ascending = Mod((Month(Max(LATEST_START_DATE))+2), 12)

 

Thank you!!

View solution in original post

6 Replies
sunny_talwar

Change your dimension to this

Month(LATEST_START_DATE)
eknezo24
Contributor II
Contributor II
Author

Hi Sunny,

Thanks! I tried this a few times and it just reorders my months into a random order....

 

2019-10-21_1136.png

 

I then tried to use my MATCH expression as a Sort by Expression and nothing seems to change... hmm.

 

Could it be that my LATEST_START_DATE field needs to be formatted a certain way?

 

sunny_talwar

It doesn't look random to me... seems like it is sorted in Month order... Jan = 1, Feb = 2, ... Dec = 12.. Can you share images of your sorting when you used the match function within the sorting...

eknezo24
Contributor II
Contributor II
Author

Hi Sunny,

 

Sorry -- didn't realize I then sorted Alphabetically and it was in order by the usual 12 mo. calendar.

 

When I use my MATCH expression in "Sort by expression" nothing changes.. see below.

2019-10-21_1422.png

 

sunny_talwar

That is strange, would you be able to share the app where we can see this issue?

eknezo24
Contributor II
Contributor II
Author

I FIGURED IT OUT!  Woo!

 

Dimension = month(LATEST_START_DATE)

Measure = the same as before

Sort by Expression Ascending = Mod((Month(Max(LATEST_START_DATE))+2), 12)

 

Thank you!!