Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis - Not Equal Too (Multiple values)

Hi All

I am looking for some help in regards to a query with SET ANALYSIS!

I have the following query that is calculating correctly, but if I set any filters the figures are re-calculated based on the filters.

sum(if(Complete<>1 and CancelledCall<>1 and LatestEntry=1,LatestEntry))

I need try and achieve the same query using Set Analysis as I need to calculate the number of logs in progress regardless of any filters that have been set.

any help would be much appreciated

Thanks

Martyn

1 Solution

Accepted Solutions
swuehl
MVP

I guess the easiest way is to use set identifer 1 in your expression:

sum( {1} if(Complete<>1 and CancelledCall<>1 and LatestEntry=1,LatestEntry))

or convert the conditions to a full set expression

sum({1<Complete -= {1}, CancelledCall -= {1}, LatestEntry = {1} >} LatestEntry)

View solution in original post

4 Replies
swuehl
MVP

I guess the easiest way is to use set identifer 1 in your expression:

sum( {1} if(Complete<>1 and CancelledCall<>1 and LatestEntry=1,LatestEntry))

or convert the conditions to a full set expression

sum({1<Complete -= {1}, CancelledCall -= {1}, LatestEntry = {1} >} LatestEntry)

Not applicable
Author

Hi Swuehl

Thanks for the quick response!

your 1st answer worked correctly and returned the value I was expecting (Thanks very much)

When I tried to convert into a full set analysis expression the system didnt seem to like it as there were errors with the query and it returned 0!

sum({1<Complete -= {1}, CancelledCall -= {1}, LatestEntry = {1} >} LatestEntry)

I decided to use the easy option!

Thanks again.

Great help

Martyn

swuehl
MVP

There is a bug in the syntax checker in expression dialog that claims the -= and following as incorrect, but the status line should say 'expression ok'

Nevertheless, you don't get the correct result, so I seem to miss something in your setting. I am glad the simple solution seems to work (even if it is probably less performant than a full set expression solution).

Have a nice day,

Stefan

Not applicable
Author

Hi martyn0578

Use Set Expression like this,

sum({1<Complete ={*}- {1}, CancelledCall ={'*'}- {1}, LatestEntry = {1} >} LatestEntry)

Answer for your question lies in the following post.

http://community.qlik.com/message/303970

Regards,

Kiran