Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
markabrom
New Contributor

Date Comparison in Set Analysis

I have a requirement where I need to use a filter to select a date, then pass the date into a variable. In Set Analysis I need to compare the variable to a Trans date and then return rows that are less than or equal to the variable.

The date format is 9/5/2017 4:24:16 PM

I have tried set analysis

Sum({1<Set_status_date="<=Timestamp($(P_date),'M/D/YYYY hh:mm:ss TT')">}Amount)

How Can I make this work?

2 Replies
Highlighted
Partner
Partner

Re: Date Comparison in Set Analysis

I've made some adjustments to your expression, I hope it helps.

Sum({1< Set_status_date={"<=Timestamp#('$(P_date)",'M/D/YYYY hh:mm:ss TT')"}>}Amount)

Plees ekskuse my Swenglish and or Norweglish spelling misstakes
Highlighted
Digital Support
Digital Support

Re: Date Comparison in Set Analysis

In addition to Vegar's post, I wanted to add the following, might help a bit more:

https://community.qlik.com/t5/Qlik-Design-Blog/Dates-in-Set-Analysis/ba-p/1472511

Regards,
Brett

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.