Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
gfisch13
Creator II
Creator II

Month Field showing numbers instead of characters

Hi,

I've loaded the following in one of my tables:   month(TRAN_DT) as Month;   to extract the month from this particular date.  In the resulting table the month field shows the 3 character abreviation, Jan, Feb, Mar....etc.

I then load the following.........

LOAD * INLINE [

    Month, Mon, QTR

    Jan, 1, Q1

    Feb, 2, Q1

    Mar, 3, Q1

    Apr, 4, Q2

    May, 5, Q2

    Jun, 6, Q2

    Jul, 7, Q3

    Aug, 8, Q3

    Sep, 9, Q3

    Oct, 10, Q4

    Nov, 11, Q4

    Dec, 12, Q4

];

The tables link properly on the month field, but when I create a bar chart where each bar is represented by the month, I'm getting the numeric equivalent, so 1, 2, 3..............what am I doing wrong?

8 Replies
sunny_talwar

Why don't you create MonthNum and Quarter using TRAN_DT?

LOAD TRAN_DT,

           Month(TRAN_DT) as Month,

           Num(Month(TRAN_DT)) as MonthNum,

           'Q' & Ceil(Month(TRAN_DT)/3) as Quarter

FROM....

Now coming back to your issue, what exactly is not working?

vinieme12
Champion III
Champion III

Month() is a dual function  , NUM(Month()) will give you numeric value

However you can still user your existing month(TRAN_DT) as Month  to compare with Numeric values

Example Select Dec in your Month Field   and in a textbox try if(Month = 12,1,0)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
gfisch13
Creator II
Creator II
Author

I have a bar chart representing monthly totals for a group of transactions.  Instead of showing Jan, Feb, Mar......as I'm expecting, the labels are showing 1, 2, 3.......I'm confused.

sunny_talwar

What dimension have you used Mon or Month? or is it a calculated dimension?

gfisch13
Creator II
Creator II
Author

I've used Month as the dimension, and I create that within the LOAD of one of my tables, so a calculated dimension.

sunny_talwar

If it is created in the script, then those are fields (and not calculated dimension). Can you post screenshots of the issues you are seeing?

gfisch13
Creator II
Creator II
Author

I deleted the chart object and reloaded my script and now the values are showing as expected.   I thought I reloaded the script each time I made a change, do I have to save at the same time for the changes to take affect??  I'm really confused as to what was wrong in the first place.   QlikSumByMonth.JPG

sunny_talwar

You don't usually have to save to see changes in effect. Not sure what might have caused it.