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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
sona_sa
Creator II
Creator II

Calendar Help

Hi Team,

I have calendar. Where Date, Year, Quarter Week and Days are available, But all these are have different - different fileds / dimensions. Now I need all parameter in a single filed. Which will contain - Quarter- Year(Q1-2018, Q2-2018 etc.), Month-Year (Jan-2018, Feb-2018, Mar-2018), year etc in a single dimension.

Can any one help me on this. Below is attached QVW.

Thanks, 

AK

Labels (1)
4 Replies
Vegar
MVP
MVP

I would recommend you to look at this page getting to know the Qlik time and date functions: https://help.qlik.com/en-US/sense/April2019/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTimeFu...

Pay extra attention to these three functions.
MonthName()
WeekName()
QuarterName()

An often used alternative to quartername() is
year([DateValue])&'-'& 'Q' & CEIL(NUM(MONTH([DateValue]))/3)
sona_sa
Creator II
Creator II
Author

Not like that. Output like.

 

Q1-2018

Q2-2019

Jan-2018

Feb-2019

2019

2019 etc...

 

In a single field or dimension.

 

sona_sa
Creator II
Creator II
Author

Hi Thanks for reply : Field like Custom_Filed - Output like Below: I can by autonumber but need need a filed witch contains the value like it :

Custom_Field
Q1-2018
Q2-2019
Q2-2018
Jan-18
Feb-18
2018
2019
 

thanks.

Vegar
MVP
MVP

I'm sorry for the misunderstanding, I've not had the opportunity to open your attached application today as I'm using my mobile, but I think the script below will meet your needs.

FinalCalendar:
//Date into common field
Load
Date as CommonCalDim,
*
Resident Calendar;

//Year into common field
Concatenate (FinalCalendar)
Load
Year as CommonCalDim,
*
Resident Calendar;

// Month-Year into common field
Concatenate (FinalCalendar)
Load
[Month-Year ] as CommonCalDim,
*
Resident Calendar;

//Quarter- Year into common field
Concatenate (FinalCalendar)
Load
[Quarter- Year] as CommonCalDim,
*
Resident Calendar;

Drop table Calendar;