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: 
Not applicable

Date variable in expression

Hi All

I have been selecting variable (vDate) but with below vDate does not refreshed

G_date and Balance comes from Data  where vDate is Variable

In below example if vDate = '12/31/2013' so I should get Summed Balance as of 9/30/2013 but it shows me as of 12/31/2013

sum({<G_Date= {'=QuarterEnd(Addmonths(vDate, -3))'}>} Balance)

Your helps are appreciated

Thanking you

Kumar

5 Replies
Not applicable
Author

$(vDate) perhaps

Fabrice

Peter_Cammaert
Partner - Champion III
Partner - Champion III


There is more to this. Expansion will not work because the replacement code between quotes is incorrect. Also, if you plainly use $(vDate), then you may end up with a value of 9 divided by 30 divided by 2013 which is ... um.... very small.

Try this:

=sum({<G_Date= {">=$(=QuarterEnd(Addmonths('$(vDate)', -3)))"}>} Balance)

Best,

Peter

Not applicable
Author

Thanks for your help and

Sorry for modification, basically I want to pick the balance from previous quarter end date. So I tried to sum for particular 09/30/2013. So let say if there is balance $125 for 09/30/2013. So I want to print this.

Sorry for inconvinience

Thanks again

Not applicable
Author

Sorry for modification, basically I want to pick the balance from previous quarter end date. So I tried to sum for particular 09/30/2013. So let say if there is balance $125 for 09/30/2013. So I want to print this.

Sorry for inconvinience

Thanks again

Peter_Cammaert
Partner - Champion III
Partner - Champion III

OK, minor modification to the previous one:

=sum({<G_Date= {"$(=QuarterEnd(Addmonths('$(vDate)', -3)))"}>} Balance)