Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
VishalWaghole
Specialist II
Specialist II

Forced Exclusion

Hi Community,

PFA test QVW application.

I want use forced exlusion on city field which contains string 'un'.

For this i used set analysis like =sum({$<~City={'*un*'}>} sales )

but its not working.

Plz guide to me where i m wrong.

Thanks and Regards,

Vishal Waghole

6 Replies
Not applicable

Try this,

 

sum

( {$<City = E({<City={"*un*"}>})>} sales

)

It will work...

er_mohit
Master II
Master II

Try This

sum( {$<City = E({1<City={"*un*"}>})>} sales)

Not applicable

Example-

LOAD * INLINE [

    City, sale_1

    abuncd, 5

    adrf, 6

    jui, 7

    unsd, 8

    oijk, 9

];

Expression-->

=sum({$<City = E({<City={"*un*"}>})>} sale_1)

Then output like this

Citysum({$<City = E({<City={"*un*"}>})>} sale_1)

adrf6
jui7
oijk9
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

sum({$<City-={'*un*'}>} sales )

see attached qvw.


talk is cheap, supply exceeds demand
VishalWaghole
Specialist II
Specialist II
Author

Hi selvakumar

thanks for rpl, your set analysis expression work fine but

its not forced exlusion.

My Question is, by using ~ this sign in set analysis how we can overcome this problem???

Thanks and Regards,

Vishal Waghole

Not applicable

Hi Vishal,

What you want is just Not Equal to (<>) and Forced exculution is little different as mentioned below

Quote by "John"

Looking at the help text, it appears that ~ is only used for forced exclusion for fields in and-mode:

"Finally, for fields in and-mode, there is also the possibility of forced exclusion. If you want to force exclusion of specific field values, you will need to use "~" in front of the field name."

Look for and-mode in the help text index for more information. But basically, under some very specific conditions, you can set up a list box for and-mode on a field. In this mode, a forced exclusion (which the ~ is duplicating) is an AND NOT. So you could make several selections in the list box, and you'd only see records matching ALL of those selections. But with set analysis, you could add to it that the record must NOT match some other value.

I've never used it in a real application, but I might as well try to set up an example based on my understanding.

OK, see attached. It demonstrates and mode and the difference between forced exclusion (~) and regular exclusion  when using set analysis.

I don't know what forced exclusion does when NOT in and mode. It doesn't seem like it was intended to be used that way. I'll need to experiment further.

http://community.qlik.com/message/77207#77207

Selva