Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating 'MonthYear' from two fields

Greetings all!

Am trying to create a MONTHYEAR field from the two separate fields, but the result is undesired.

error loading image

As far as I could understand, the result should be:

200901
200902
200903
200904
...

And the same to all other years... the code I'm using for that follows:

Year & DATE(Month,'MM')

And I could not find anything different from that through the tutorials and F1 in QV...

Any thoughts?

Thank you again!!!

8 Replies
Not applicable
Author

Use DATE(YEAR,MONTH)

fIBER9906

Not applicable
Author

It could be beter use monthname(date(YEAR,MONTH))

Not applicable
Author

Just to clarify, I must replace de MONTH and YEAR by my fields, correct?

Not applicable
Author

Tried both, and these were the results...

Any other thoughts? I'm trying create this field in the format YYYYMM to link it to a fact table, therefore, its crucial...

Thanx all!

Not applicable
Author

Yes, of course. Your name fields are equal to arguments. Try this and tell me.

Fiber906

Not applicable
Author

Hello fiber9906! These are the results! Any other thoughts???
Not applicable
Author

Excuse me Thiago for not to reply as quickly as you need. I was mistaked; look at attached file and I hope it is what you are looking for:

Not applicable
Author

Thank you for the reply!

I have found out the solution for it last night...

DATE(MAKEDATE(Year, Month), 'YYYYMM')

It has brought me the expected result (200901, 200902, ...) Have seen your file, and it might be very useful in the future.

Thx for the info exchange! Always a pleasure!