Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

sumitsahu009
New Contributor II

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

Re: Problem in Filtering data in Set Analysis

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


sureshqv
Esteemed Contributor III

Re: Problem in Filtering data in Set Analysis

try this

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

sumitsahu009
New Contributor II

Re: Problem in Filtering data in Set Analysis

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"

sumitsahu009
New Contributor II

Re: Problem in Filtering data in Set Analysis

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

eg: x/y

Not applicable

Re: Problem in Filtering data in Set Analysis

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

boorgura
Valued Contributor

Re: Problem in Filtering data in Set Analysis

Please try this:

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

Re: Problem in Filtering data in Set Analysis

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 '/'

Community Browser