Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

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

Problem with Date Timestamp

Hello everyone,

I'm developing a set analysis condition to filter only 3 months.

For it, i have 2 variables:

$(v1) = Max(Date(AddMonths(Date,-6), 'MMM YY')), output: Dec 18

$(v2) = Max(Date(AddMonths(Date,-12), 'MMM YY')), output: Jun 18.

 

However, when i try to create a set analysis with both that conditions, it gets me a error.

Set analysis: Count({< [Date]={">=$(=v2) <=$(=v1)"} >} [Measure])

 

Can anyone help me with this?

2 Replies
laurischarf
Contributor III

Re: Problem with Date Timestamp

Try putting the equal sign into your variable definition, like:

=Max(Date(AddMonths(Date,-6), 'MMM YY'))

And then maybe remove it from the set analysis, like:

Count({< [Date]={">=$(v2) <=$(v1)"} >} [Measure])

Or your variable may need to be a full date, not MMM YY -- I wonder if Qlik sees the variable as text rather than date.

=Date(Max(AddMonths(Date,-6)))

Partner
Partner

Re: Problem with Date Timestamp

Hello,

Try this expression: Count({< [Date]={">=$(=$(v2)) <=$(=$(v1))"} >} [Measure])

cordially.

Excuse my english, i'm french!