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: 
mukesh19
Contributor II
Contributor II

Function in If

Hi all,

I have a small problem in the aggregation function  that is if I am using the below query I am not able to get the answer

count({< $(=upper(column1))={'SAMPLE'}>}   result)

The column1 has values in different cases(sample,Sample,SAMPLE,SAMple).In each and every case I require the result.

I know that I can use comma seperator as  count({< column1={'SAMPLE','sample','Sample','SAMple'}>}   result)

to achieve the result but there  may be n cases. Is there any direct method to achieve this.

can u guys help to solve the problem.

regards,

mukesh..

1 Solution

Accepted Solutions
sunny_talwar

Here try this

Count({<column1 = {"=Upper(column1) = 'SAMPLE'"}>} result)


Capture.PNG

But i think in the future anything between the double quotes with be case insensitive....

Quotes in Set Analysis

View solution in original post

14 Replies
sibusiso90
Creator III
Creator III

The function upper makes the whole word caps making your 'Sample' in existence.

sibusiso90
Creator III
Creator III

For something to read on set analysis Set Analysis: syntaxes, examples to get a better understanding.

sunny_talwar

What is the reason for using Upper here? can you elaborate?

mukesh19
Contributor II
Contributor II
Author

The data is in different cases as mentioned so I want the result for all the relevant data irrespective of the upper or lower or mixed

sunny_talwar

I believe that this should work

Count({<column1 = {"Sample"}>} result)

mukesh19
Contributor II
Contributor II
Author

It is displaying only the values that are related to Sample but not displaying the values related to remaining cases

sunny_talwar

From what I have seen, set analysis is case insensitive... let me put together a quick sample to check and verify

its_anandrjs

May be check this it is worked for you.

=sum( if( Match( column1, 'Sample' ), Result )  )

its_anandrjs

Check the attached may help you

LOAD *,Capitalize(column1) as capVal ;

LOAD * Inline

[

column1,Result

SAMPLE,10

sample,20

Sample,30

];

Output

OP6.PNG