Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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..
Here try this
Count({<column1 = {"=Upper(column1) = 'SAMPLE'"}>} result)
But i think in the future anything between the double quotes with be case insensitive....
The function upper makes the whole word caps making your 'Sample' in existence.
For something to read on set analysis Set Analysis: syntaxes, examples to get a better understanding.
What is the reason for using Upper here? can you elaborate?
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
I believe that this should work
Count({<column1 = {"Sample"}>} result)
It is displaying only the values that are related to Sample but not displaying the values related to remaining cases
From what I have seen, set analysis is case insensitive... let me put together a quick sample to check and verify
May be check this it is worked for you.
=sum( if( Match( column1, 'Sample' ), Result ) )
Check the attached may help you
LOAD *,Capitalize(column1) as capVal ;
LOAD * Inline
[
column1,Result
SAMPLE,10
sample,20
Sample,30
];
Output