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: 
ARamundo1687543498
Contributor
Contributor

Tmap problem

Hi, I’m Alessio Ramundo and I’m a student of the University of Calabria (Italy). I found a problem with the component tmap. When I choose the function getpartofdate, in the section ‘expression’ I can choose ‘month’,’year’ or other as documentation. But if I would the semester or the quarter, is there a solution for this? I tried to write ‘SEMESTER’ or ‘QUARTER’ but it doesn’t work. I have only 0.

thank you very much for the attention.

Labels (3)
1 Reply
anselmopeixoto
Partner - Creator III
Partner - Creator III

Hi Alessio,

 

Unfortunately there aren't SEMESTER and QUARTER expressions for the getPartOfDate method, but you can achieve the same result by doing a division over the MONTH expression result:

 

QUARTER: (TalendDate.getPartOfDate("MONTH", input_date))/3+1 //add one at the end to start at quarter 1 instead of 0

SEMESTER: (TalendDate.getPartOfDate("MONTH", input_date))/6+1 //add one at the end to start at semester 1 instead of 0

 

I hope it helps.

Best regards,

Anselmo