Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
gouthamkk
Creator
Creator

Set Analysis Expression

HI Experts,

I am trying to replace IF condition using set analysis, attached is the sample data set with QVW

I have 2 textboxes

1) condition using IF

2) replacing IF with Set Analysis

Request for help

Thanks

Kumar

1 Solution

Accepted Solutions
venkatg6759
Creator III
Creator III

Check the attached solution .

Let me know

View solution in original post

12 Replies
venkatg6759
Creator III
Creator III

Create a variable for your approval date

Let say vApprovalDate = date(ApprovalDate, 'MM/DD/YYYY hh:mm;ss[.ffff] TT')

then

Count({<state={'CA'},  Joindate = {"'>=$(vApprovalDate)"}>}ID)

gouthamkk
Creator
Creator
Author

HI

Tried it and getting 0

Greg_Williams
Former Employee
Former Employee

Can you share the data source?

venkatg6759
Creator III
Creator III

Try this

Count({$<state={'CA'}, Joindate *= {'>=$(vApprovalDate)'}>}ID)

gouthamkk
Creator
Creator
Author

HI Greg,

I attached sample data set

gouthamkk
Creator
Creator
Author

HI Venkat,

Getting 0 again

venkatg6759
Creator III
Creator III

check the date format

it should be =date(ApprovalDate, 'MM/DD/YYYY hh:mm:ss[.ffff] TT')

Next where is field called ID in the sample data which you provided.

gouthamkk
Creator
Creator
Author

Apologies forgot to add id and I did try in the format you gave, I am getting 0

venkatg6759
Creator III
Creator III

Check the attachment

there is only one date that is higher than the approvaldate in joindate