Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
markabrom
Contributor
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
Vegar
MVP
MVP

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)

Brett_Bleess
Former Employee
Former Employee

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 do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.