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

Dynamic Month Name in Chart Title

I have created a dynamic chart title to display the month & year name for 11 months ago through the current month selected. (ie: "Trl 12 Quotes for Feb 2008 through Jan 2009").

I am using a variety of QlikView functions:

=

'Trl 12 Quotes for ' & month(addMonths(vAnalysisAnchorDate, -11)) & ' ' & year(addMonths(vAnalysisAnchorDate, -11)) & ' thru ' & month(vAnalysisAnchorDate) & ' ' & year(vAnalysisAnchorDate)



The variable pulls the the last month of the dates selected or the most recent month that data exists if no selections are made.

The data works fine. I'm not having any issues with how it is pulling the data. The title is the only issue. This works just fine unless one of the months is Jan. If the month is Jan, it displays "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec 2008". I have tried using a min, max, MonthStart, MonthEnd, makedate to change it to a different day in Jan in case that was the issue, substituting out the variable for just plain Date (then choosing the month of Jan to see what is displayed), and combinations of all of the above all with the same result.

Any help would be much appreciated.

1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Aline,

could you create a small example and post it? we could then review it and look for possible reasons...

View solution in original post

5 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Aline,

could you create a small example and post it? we could then review it and look for possible reasons...

Not applicable
Author

When I created the small sample , it is not having the same issue. I have attached a qvw to show what I am doing. I included the variable that I created.

The actual qvw is 65MB on a 6G of RAM machine that pulls in 15 qvd's that range in size from 2k to 415MB. I'm wondering if this is the issue.

pover
Luminary Alumni
Luminary Alumni

You aren't using any function that would create a comma-separated list, so I would double check that the MonthNames system variable is properly defined in the script. It should be

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

Regards.

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

The only comment I have is that it's usually better to keep numeric values of the dates in variables, as opposed to the formatted dates or timestamps. All the same date functions still apply, and numbers are much more flexible than strings when it comes to operating with dates.

I'm not sure if that's the problem, but I'd give it a try...

Just include your formula for the variable into function num( ), to get the numeric representation of the date.

Other than that, it's hard to say what the problem is, because we can't recreate it in your example...

Not applicable
Author

I started having issues with other formulas that had already been approved by QA with no changes made for the last several weeks. Now they are no longer working or giving random numbers. I redid the qvw from scratch and the error no longer exists.

The file might have been corrupted.

Thanks for your help.