Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

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

Re: Month as Text not Month Number

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

MVP
MVP

Re: Month as Text not Month Number

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

Re: Month as Text not Month Number

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

MVP
MVP

Re: Month as Text not Month Number

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.

Re: Month as Text not Month Number

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

If so try with Text(MonthFieldName)

Community Browser