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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with date

Hi, I have a question, i have my information with no date, the only thing i have are months and years, i need to change the numbers of the month in letters, does anyone can help me plz

Greetings and thanks

13 Replies
hector
Specialist
Specialist

can you try this?


month(makedate(Year_Field,Month_Field_numeric))


Explanation: makedate() creates a valid date with at least 1 parameter (year), with 2 or more, you can create any date you want, and month() will return the name of the month defined in the variable MonthNames

Rgds

Not applicable
Author

I tried but didnt work, well it work but it doesnt make the relationship with the other data, look i have this formula:

sum({$<Year = {$(=only(Year))}, Month = {"<=$(=max(Month))"}>} LineSalesAmount)

Year = 2009

Month = 1

and i have a Month List Box 1,2,3,4,5,6,7,8,9,10,11,12 when i change it to Jan, Feb,....... the formula doesnt work

CAN YOU HELP ME PLS URGENT!!!!!!!!!!

hector
Specialist
Specialist

if the month field has a numeric value, but shows itself like 'Jan', you can use num(Month_Field), in case of Jan, it will return 1

rgds and good luck

hector
Specialist
Specialist

if the month field has a numeric value, but shows itself like 'Jan', you can use num(Month_Field), in case of Jan, it will return 1

rgds and good luck

Not applicable
Author

]Thank you very much, be well

Not applicable
Author

Does anybody has another solutions to my problem pls URGENT!!!

Not applicable
Author

The "num(Month)" seems fine to me.

Using "Month" in a formula should be interpreted as an integer, even if it's displayed as a string in your list.

You can also create a separated table :


// Mapping months names.
Month_Name:
MAPPING LOAD * INLINE [
x, y
1, Janvier
2, Février
3, Mars
4, Avril
5, Mai
6, Juin
7, Juillet
8, Août
9, Septembre
10, Octobre
11, Novembre
12, Décembre
];


add another field "LibMonth" in your table with those specific names :


applymap('Month_Name', num(Month(TempDate)), null()) AS LibMonth


Instead of showing a list of "Month", display a list of "LibMonth". Your formula won't be affected.

Not applicable
Author

Thanks nmartin, let me try and I send you my results

Regards,

Not applicable
Author

How do you will apply your example in my formula, can you help with this pls???

sum({$<Year = {$(=only(Year))}, Month = {"<=$(=max(Month))"}>} LineSalesAmount)

thanks