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

Month as Text not Month Number

In one instance I am using a field

Month(InvoiceDate) as [Weekly Month],

This returns a month number rather than the name.  Is there a way to also map this to a name? To display Jan,Feb,Mar etc.

5 Replies
MayilVahanan

Hi

Month(InvoiceDate) return number? But it display jan,feb...

Any way, try like this,

Load * inline

[

Month,WeeklyMonth

jan,1

feb,2

..

Dec,12

];

And use Month as field for your requirement

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
swuehl
MVP
MVP

Month() should return a dual value (check out the Help for more details on Month and dual value).

So it carries as well a numeric as a text value. You can force QV to return either one by using

num(Month(DATEFIELD))

or

text(Month(DATEFIELD))

If you don't force QV, it will return the value depending on the context, i.e. if comparing to a numeric value, it will return the numeric representation. If you use Month(DATEFIELD) as dimension, it will probably use the text value.

Where do you use your dual (i.e. [Weekly Month] field)?

Hope this helps,

Stefan

Not applicable
Author

The reason for two month selections is that an invoice has two month options, one for the invoice date, the second is what year and period the invoice is added to the General Ledger.

The date selection at the top uses the GL dates, and the forecast year uses the invoice date (Weekly Month)

2012-09-19_1549.png.

@Swuehl when forcing the text as month it only displays Jan and Dec, with the majority of data being held under Jan.

2012-09-19_1558.png

swuehl
MVP
MVP

I can't see your complete calculated dimension you are using, but check that you are not applying month() function to a field that hold month values already.

CELAMBARASAN
Partner - Champion
Partner - Champion

Are you applying Month function to the month number(may be a month field)?

If so try with Text(MonthFieldName)