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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
rockam
Contributor II
Contributor II

Concatenate Year+Month

Hi Guys,

I´d like to create a new dimension, where I can connect two existed dimensions (year/month) and character ", " = for example 2021, Jun. 

Could I do it in calculate dimension by some formula, or should I solve it in the script?

Here I need to concatenate [MonthName] & [year]

LOAD
[year],
[month],
[date],
[currency],
Num#(impressions) as imp,
Month(Date#([month],'M')) as [MonthName]

Here [MonthName] is calculated based on this script: Month(Date#([month],'M')) as [MonthName].

The table view is just like below:-

rockam_1-1632995108687.png

 

Any help or suggestion on the script would be appreciated.

Thanks in Advance,

AK

 

 

 

 

 

 

 

 

 

Labels (1)
4 Replies
abhijitnalekar
Specialist II
Specialist II

Try this,

 

LOAD
[year],

[year]&','& Month(Date#([month],'M'))  as MonthYear,
[month],
[date],
[currency],
Num#(impressions) as imp,
Month(Date#([month],'M'))  as [MonthName]

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
rockam
Contributor II
Contributor II
Author

Hi - Can I sort this filter based on the newest to the oldest timeframe?

rockam_0-1632996525935.png

Please help here.

jyothish8807
Master II
Master II

You can sort by expression :

Max({1}Date)

Best Regards,
KC
MayilVahanan
MVP
MVP

Hi 

Try like below

MakeDate(Year, Month) as MonthName

and use that in filter

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.