Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Please Help

Dear All

Please tell how to Make Logic with condition Mentioned Below

from  today's [current] date to last six month.

how can i write logic for this

Thanks In Advance!

Timba

3 Replies

Re: Please Help

I need more detail to help you,

you may use addmonths (Today(),-6) that return 2014/03/05

in this case you can set a condition where values are taken between the two dates

Not applicable

Re: Please Help

Hi ,

Try Like this .

Expression

=sum({<trn_Date={'>=$(VarPrev6Maxdate)  <=$(VarMaxdate)'}>}  amount)

Variables

VarPrev6Maxdate : date(max(trn_Date),'DD-MM-YYYY')

VarMaxdate : Date(AddMonths(VarMaxdate,-6),'DD-MM-YYYY')

Thanks !!

Re: Please Help

Hi

Try like this

=sum({<DateField ={">=$(=Date(MonthStart(Max(DateField),-5),'DD-MM-YYYY'))  <=$(=date(max(DateField),'DD-MM-YYYY'))"}>}  amount)