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

How to create a quarter column based on week number on load script

Hi

I am trying to determine the quarter within which the week number sits within on a load script.

I have a list of records with a column of [week] but am struggling to get it to determine the quarter.

I have managed to convert a date to months but am struggling with this one.

thanks

martin

1 Solution

Accepted Solutions
sunny_talwar

Apologize, the name of the function is MakeWeekDate()

'Q' & Ceil(Month(MakeWeekDate(Year(Today()), [week]))/3) as Quarter

View solution in original post

5 Replies
sunny_talwar

May be like this:

'Q' & Ceil(Month(MakeWeekYear(Year(Today()), [week]))/3) as Quarter

martin_hamilton
Creator
Creator
Author

Hi Sunny

am receiving the error below:

Error in expression:

MAKEWEEKYEAR is not a valid function

any ideas

sunny_talwar

Apologize, the name of the function is MakeWeekDate()

'Q' & Ceil(Month(MakeWeekDate(Year(Today()), [week]))/3) as Quarter

martin_hamilton
Creator
Creator
Author

worked a treat thank you

sunny_talwar

Awesome, if you now have got what you were looking for, please close this thread by marking correct and helpful responses.

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny