Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to convert month from numbers to text in the bar chart dimension

Hi,

I am very new to Qlik view, I need to  show month as the dimensions.

Can some one help me how to convert Month values in my table from 1,2,3....12 to Jan, Feb, Mar....Dec using various options like by if statement, set analysis....

8 Replies
vinieme12
Champion III
Champion III

create a mapping table  to  map month numbers to monthnames during load and then use this field in your charts

Map_Month:

Mapping Load * INLINE [

MonthNumber,MonthName

1,Jan

2,Feb

.

.

.

];

FACT:

LOAD * ,

Applymap('Map_Month',yourmonthfieldinFACT) as MonthShortName

FROM...

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
sunny_talwar

Another way to do this would be to do like this:

as your dimension

Month(Date#(MonthFieldName, 'M'))

or this in load script

Month(Date#(MonthFieldName, 'M')) as MonthName

and then just use MonthName as your dim

Anil_Babu_Samineni

You want to show only one object for this

You may try this too

Take List box and choose Expression from Drop down then paste this and change your field name instead of MonthFieldName then give Title Month

Pick(Match(MonthFieldName, '1','2','3','4','5','6','7','8','9','10','11','12'),'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
varshavig12
Specialist
Specialist

Date(Date#(Month,'MM'),'MMM')

or

Month(Date#(Month,'MM'))

Anonymous
Not applicable
Author

Hi,

In any Expressions or In Dimensions,

If you write Month(Your date filed),it will brings months name like...jan,feb,,....dec.

and

if you write num(Month(your date filed)),it will brings months numbers like..1,2,3,...12.

Anonymous
Not applicable
Author

If you want to convert months from numbers(1,2,3........12)to names(jan,feb,.....dec),

Month(Date#(your date filed,'M'))

Not applicable
Author

By using Month function we can derive month from Date field like below

Month(Date)

Month (Today()))

Not applicable
Author

Thanks to all of you for your valuable answers. I posted a new question.

Can some one help me with that