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: 
Anonymous
Not applicable

Problem in Filtering data in Set Analysis

I have data where i have three columns:

a | b | c

I want to write set analysis to calculate avg of c when b <> "text1/text2". Where (text1/text2) is just text in column b.

Here the value i am comparing has "/", i think that is creating problem in comparison.

I am writing set analysis as given below and its not working:

avg({<b-={'text1/text2'}>}c)

Can anyone please help me with this, I am stuck here.

Thanks

7 Replies
Not applicable
Author

Try without single quotes:

avg({<b-={(text1/text2)}>}c)


Alternatively, create field "Text3" (=text1/text2) in script and use that field in the set:


avg({<b-={text3}>}c)


Regards,

Pravesh


Chanty4u
MVP
MVP

try this

avg({<b-={(text1/text2)}>}c)

Anonymous
Not applicable
Author

Thanks Pravesh,

But this solution doesn't seem to work since text1 and text2 are not columns.

text1/text2 is just some random text (text1 and text2 are not columns).
for eg.  "sumit/sahu"

Anonymous
Not applicable
Author

it says error in expression since text1 and text are not columns, its just random text.

eg: x/y

Not applicable
Author

In that case, what is the logic of text1/text2?

boorgura
Specialist
Specialist

Please try this:

avg({<b={"*"} - {'text1/text2'}>}c)

sunny_talwar

I don't think '/' should cause any issues, but try this may be:

Avg({<b -= {'text1*text2'}>} c)

Where * is used a wildcard to replace '/'