Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
rupaliqlik
Creator
Creator

want to convert string

Hi,

I have Two columns in my application year and month.Year 2018,2017 and Month are from 1 to 12.

i want output like this

Jan 2017
Feb 2017
Mar 2017
Apr 2017
May 2017
Jun 2017
Jul 2017
Aug 2017
Sep 2017
Oct 2017
Nov 2017
Dec 2017

Labels (1)
4 Replies
akshay61
Contributor II
Contributor II

Hi,

 

You can make an inline table and map your month column in it...

You can refer to the below example

You have to give the same field name as in DB for "Month_in_Number"

MappingMonth : 

Load * Inline [

Month_in_Number,Month

1, Jan

2, Feb

3, Mar

4, Apr

5,May

6,Jun

7,Jul

8,Aug

9,Sep

10,Oct

11,Nov

12,Dec

]; 

Thanks,

Akshay

jpenuliar
Partner - Specialist III
Partner - Specialist III

You can make use of a combination of functions Makedate() and MonthName() like below:

Load *,
MonthName(Makedate([Year],[Month])) as MonthYear;
Load * Inline [
Month,Year
1,2017
2,2017
3,2017
4,2017
5,2017
6,2017
7,2017
8,2017
9,2017
10,2017
11,2017
12,2017
];  

akshay61
Contributor II
Contributor II

You can make use of Master Calendar... That will solve your problem...

sasis551
Contributor III
Contributor III

Hi,

date(date#(month,'MM'),'MMM') as month_name   =>  in script 

 or 

in list box=>go to expression =>     =date(date#(month,'MM'),'MMM')

 

it works