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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Transform date inside graph

Hi Qlikview community,

I have created a line graph as depicted in the attached image below.

The problem is that my dimention has a format like 2012-1,2012-2,.....2013-1,2013-2...e.t.c

Is there any way to tranform my format in something like 2012-Jan,2012-Feb but to do the tranformation inside the graph????

I have already tried =SubField(b.TestMonthYear,'-',1)&'-'& if(SubField(b.TestMonthYear,'-',2)=1,'Jan','Feb')...etc inside dimemntion text format but it works for 2 months only althought i believe it should be able to do it for every month but nested if does not work.

Any help appreciated.

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You could try this:

=SubField(b.TestMonthYear,'-',1)&'-'& pick(SubField(b.TestMonthYear,'-',2),'Jan','Feb','Mar','Apr','Jun','Jul','Aug','Sep','Oct','Nov','Dec')

But perhaps you should split that field in the script so you have a year and a month field for use in the chart.


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You could try this:

=SubField(b.TestMonthYear,'-',1)&'-'& pick(SubField(b.TestMonthYear,'-',2),'Jan','Feb','Mar','Apr','Jun','Jul','Aug','Sep','Oct','Nov','Dec')

But perhaps you should split that field in the script so you have a year and a month field for use in the chart.


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks for your time Gysbert it works like a treat...Just add the May in months to get the totally correct expression.
I know that i should do in within the script but i want to learn to do it on the fly to...:)