Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
jim_chan
Specialist
Specialist

How to write this in set analysis?

hi guys,

I have a formula here, can anyone help me to change to set analysis?

If((not (IsNull(grp_cust_id) and IsNull(trip_end_date))),count(trip_id)) -  it works in IF statement by the way.

Rgds,

Jim

1 Solution

Accepted Solutions
sunny_talwar

May be this:


Count({<grp_cust_id)) = {'*'}> + <trip_end_date = {'*'}>} trip_id)

View solution in original post

11 Replies
trdandamudi
Master II
Master II

May be as below:

Count({<Len(Trim(grp_cust_id))>{'0'},Len(Trim(trip_end_date)={'0'})>}   trip_id)

OR


Count({<grp_cust_id={'*'},Len(Trim(trip_end_date)={'0'})>}   trip_id)

Anonymous
Not applicable

Would create flags in script for both null scenarios then use the flags in the set analysis

set analysis something like count({<[grp_cust_id_flag]={'Y'},[trip_end_date_flag]={'Y'}>}trip_id)

jim_chan
Specialist
Specialist
Author

Hello Thirumala,

there modifier expression error.

error.jpg

Rgds,

Jim

jim_chan
Specialist
Specialist
Author

ok.. will try it out .

sunny_talwar

May be this:


Count({<grp_cust_id)) = {'*'}> + <trip_end_date = {'*'}>} trip_id)

trdandamudi
Master II
Master II

Give a try on the below:

Count({<Len(Trim(grp_cust_id))={'>0'},Len(Trim(trip_end_date)={'0'})>}   trip_id)

OR


Count({<grp_cust_id={'*'},Len(Trim(trip_end_date)={'0'})>}   trip_id)

trdandamudi
Master II
Master II

Sunny,

grp_cust_id should be not null and trp_end_date should be null, I think you need to modify the expression..

jim_chan
Specialist
Specialist
Author

this works. -

Count({<grp_cust_id = {'*'}> + <trip_end_date = {'*'}>} trip_id)

sunny_talwar

I think Not is over-arching both the fields grp_cust_id and trp_end_date

If((not (IsNull(grp_cust_id) and IsNull(trip_end_date))),count(trip_id))