Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
50ShadesOfSalty
Partner - Contributor III
Partner - Contributor III

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?

Labels (3)
2 Replies
Lauri
Specialist
Specialist

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)))

Seyko
Partner - Creator
Partner - Creator

Hello,

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

cordially.

Excuse my english, i'm french!