Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
soniasweety
Master
Master

set filter

Hi all,

I have below expression in my table ,,so I want to include the some filter value within it how can I do this?

.if(Time>=Normal and Time<=Urgent,number,0)

in above  Type={'VM','SO'}        how to include this in above expression?

Thanks

Sonica

1 Solution

Accepted Solutions
sunny_talwar

May be like this

Only({<Type={'VM','SO'}>} If(Time >= Normal and Time<= Urgent, number, 0))

View solution in original post

5 Replies
sunny_talwar

May be like this

Only({<Type={'VM','SO'}>} If(Time >= Normal and Time<= Urgent, number, 0))

soniasweety
Master
Master
Author

tq sunny,

if I want to write that with setanalysis  total exp without if?   how can I write?

Kushal_Chawda

You can create one field in script for if condition

LOAD ..

if(Time>=Normal and Time<=Urgent,number,0) as number_final

...


Now you can write the expression as


=sum({<Type={'VM','SO'} >} number_final)

PrashantSangle

If Time,Normal and Urgent all three field coming from one table then create flag in script

like

if(Time>=Normal and Time<=Urgent,'1','0') as flag


then your set expression try like

only({<flag={"1"},Type={'VM','SO'}>}number)

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
soniasweety
Master
Master
Author

thanks all for clear explanations

Thanks

Sonica !!