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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

What does MONTH function actually do?

I have the following line in my script:
Month(Coalesce(OM.ClosedDate,'1/1/1989')) As "Month",
Now, the reference manual says:
month(date)   Month. Returns a text string representing the month when the fraction of expr is interpreted as a date, but can be formatted as a number.   Example:  month( '1971-10-30' ) returns Oct.
But when I run the script, the field "Month" is filled with "1,2,3,4..", and not text names. This makes reports harder to read.
I've asked this question a couple of times, and gotten well-meaning but non-helpful replies, such as use Load Inline.. constructs in the script (did that, Month still reports as number, not text. So, let me rephrase more explicitly, with emphasis:
How do I convert the Month number to the text name IN THE TABLES, NOT IN THE SCRIPT?
And since I'm a newbie, please don't just post a formula, but tell me where to put it (i.e. what Properties tab, what formula, etc.
I'm using month as a dimension in a sales report - the only mathematics is sum(Sales).
11 Replies
Not applicable
Author

Hi Stefan, I have gone through all the tutorials, but they have very little detail on scripting, and what they have focuses simply on loading from text or Excel tables, not massive SQL databases! I did create a small example that loaded from an Excel sheet instead, and it worked fine, but that's because I was only using QV functions and no SQL.(Single LOAD statement, with last two lines modified to get "Month" and "Year" from "Sale Date"). But working with mixed QV and SLQL scripts isn't covered, and I'm not sure how what happens in one part affects what happens in the other part. This is the sort of high level stuff I'm looking for but can't seem to find here.  <p><p>I did, however, resolve my labelling issue. I assumed, because the "Label" box was grayed out, you couldn't select it. Surprise! As my boss showed me, all I had to do was click on the label box, and I could enter anything, so that's fixed.

swuehl
MVP
MVP

Kevin,

I assume the box itself is not greyed out, but the text <use field name> is written in a greyish color?

Well, that might be confusing.

This forum is a great place to find information about almost anything. Don't be shy hacking everything you need to know into the search bar (upper right), e.g. enter SQL LOAD, then you find as one of the first listed threads:

http://community.qlik.com/thread/13682