Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mfikrirahmat
Contributor
Contributor

change QuarterYear To Date

I have expenditure variable "Q4-2016", I want to change it to date 12/1/2016


1 Solution

Accepted Solutions
PrashantSangle

Hi,

try like

=MakeDate(right('Q4-2016',4),right(left('Q4-2016',2),1)*3,1)

or

=MakeDate(right(expenditure,4),right(left(expenditure,2),1)*3,1)

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

5 Replies
sunny_talwar

May be like this

Date(MakeDate(Right(expenditure, 4), Num(Month(Date#(KeepChar(expenditure, '0123456789-), 'M-YYYY')))*3, 1))

PrashantSangle

Hi,

try like

=MakeDate(right('Q4-2016',4),right(left('Q4-2016',2),1)*3,1)

or

=MakeDate(right(expenditure,4),right(left(expenditure,2),1)*3,1)

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
tresesco
MVP
MVP

Or like (without any string function):

=MakeDate(Year(Date#('Q4-2016', 'QM-YYYY')),Month(Date#('Q4-2016', 'QM-YYYY'))*3)

Sergey_Shuklin
Specialist
Specialist

Hi, Mfikri!

Or like that:

date#(pick(match(left(expenditure,3),'Q1-','Q2-','Q3-','Q4-'),'3/1/','6/1/','9/1/','12/1/')&right(expenditure,4),'MM/DD/YYYY')

mfikrirahmat
Contributor
Contributor
Author

It's Work , thank you so much