Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
New Contributor

If Statement in Data range

I am trying to create an IF statement to call out the data from a date range, for 3 months, 2 months, and 1 month, for a specific type of product.

{<[Date]={if(">=$(=Date(AddMonths(LasRefresh,-3)) <=$(=Date(AddMonths(LasRefresh,-2)))",'3 Months'

,if(">=$(=Date(AddMonths(LasRefresh,-2)) <=$(=Date(AddMonths(LasRefresh,-1)))",'2 Months')

,if(">=$(=Date(AddMonths(LasRefresh,-1)) <=$(=Date(AddMonths(LasRefresh,-1)))",'1 Month')}
,[Product Type]={'Sale'}
>} [Date] )


3 Replies
Contributor III

Re: If Statement in Data range

Why don't you just try to add the conditional statement at back end and create one extra field though script.

New Contributor

Re: If Statement in Data range

How and what should I add to my expression/script in order to make what i want to display?


Re: If Statement in Data range

Joey, check the following Design Blog Link and note there are some other links at the bottom of that post as well:


Hopefully this will help you get things sorted out and feel free to back the URL up to the Qlik-Design-Blog/ level and use the search dialog there to dig further if you wish.


To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.