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: 
youss123
Contributor III
Contributor III

Excluding values in set analysis

Hi all,

field1 : {value1, value2, value3}    field2:{valueA, valueB, valueC}

field3 : {valueee1, valueee2, valueee3}    field4:{valueeeA, valueeeB, valueeeC}

I want to exclude just the combinaision when field1 =value2 and field2 = valueC without deleting the other combinations

I want to exclude also the combinaision when field3 =valueee2 and field2 = valueeeC 

field 1        field2

_____________

value1      valueB

value1      valueC

value2       valueC

value2        valueA

value3         valueB

value3         valueC

 

field 3        field 4

_____________

valueee1      valueeeB

valueee1      valueeeC

valueee2       valueeeC

valueee2        valueeeA

valueee3         valueeeB

valueee3         valueeeC

 

 

 

this script does not work for me : 

pss: first part work all alone and the second also but not both combined *

 

count(distinct{<Field1 -= {'value2'}>+<Field2-={'valueC'}

*

Field3 -= {'valueee2'}>+<Field4-={'valueeeC'}

>}[KeyStay])

 

Thank you for your help

 

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

try below

=count({<

KeyStay=e({<Field1={'value2 '},field2={'valueC'}>+<field3={'valueee2 '},field4={'valueeeC'}>}KeyStay)

>} Distinct KeyStay)

 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

8 Replies
Chanty4u
MVP
MVP

Try this

count(distinct{<Field1 -= {'value2'}, Field2 -= {'valueC'}, Field3 -= {'valueee2'}, Field4 -= {'valueeeC'}>}[KeyStay])

 

youss123
Contributor III
Contributor III
Author

Hello @Chanty4u  it's not working because it delets all the ligne where Field1 -= {'value2'}, Field2 -= {'valueC'}, Field3 -= {'valueee2'}, Field4 -= {'valueeeC'} 

and I want just to delete the combinaisons in bold in my example.

Thank you anyway

NiTo
Creator
Creator

Hi,

What is Keystay here???

Regards,

youss123
Contributor III
Contributor III
Author

Hello @NiTo 

 

It's a key that I want to make the count on 

 

Thanks

Kushal_Chawda

@youss123  did you try this

count(distinct{<Field1 -= {'value2'}>+<Field2-={'valueC'}>+<Field3 -= {'valueee2'}>+<Field4-={'valueeeC'}>}[KeyStay])

vinieme12
Champion III
Champion III

try below

=count({<

KeyStay=e({<Field1={'value2 '},field2={'valueC'}>+<field3={'valueee2 '},field4={'valueeeC'}>}KeyStay)

>} Distinct KeyStay)

 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
youss123
Contributor III
Contributor III
Author

Hello @Kushal_Chawda Yes I did , not working 😞 

Thank you anyway

youss123
Contributor III
Contributor III
Author

Thank you vm @vinieme12  , it's working. Is it possible to explain me the solution ?

many thanks in advance