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

Help with an expression?

Hi,

I have the following expression that I need to understand, can you please let me know what do mean each section:

= Count(Aggr(Only({$<ID = e({<[Closure Code]={'wrong module','Transferred to new module'}>})>} [Case Count]), AutoID))

I know that the on red are fields, but I need to know what does the blue words/letters. I need to add exclusions for other fields, can I just add a coma and will work?

Please advise.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I think that I found the issue, the problem is with the data and not with the expressions that you provided me. I am working on improve the way that I filling qlikview. If I have problems again I will ping you.

Thanks

View solution in original post

40 Replies
sunny_talwar

This is basically saying that Count DISTINCT Case Count per AutoID where a particular id doesn't have Closure Code as wrong module or transferred to new module.

and yes, to add more exclusions you need to add them in the list separated by comma

Anonymous
Not applicable
Author

The problem is that instead of decreasing the numbers are increasing them. :S

Do you know another way to do it, to see if I get the same results?

sunny_talwar

Difficult to say without looking at a sample? Can you provide some sample data with the expected output?

Anonymous
Not applicable
Author

Cannot provide a lot of information, however this is the original calculation:

= Count(Aggr(Only({$<ID = e({<[Closure Code]={wrong module','Transferred to a new module'}>})>} [Case Count]), AutoID))

Then, I update as the following to get what I though a new filter will decrease the number, but happened the opposite:

=Count(Aggr(Only({$<CustomID = e({<[Closure Code]={'wrong module','Transferred to a new module'},[State] = {'Pre','Invalid'}>})>} [Case Count]), AutoID))

I have noticed that the ID won't relate the fields Closure Code or State, so I use another field that relates both fields. But I am getting extra records.

I need to count distinct all records that aren't wrong module, transferred to a new module, or with the state on Pre or invalid.

Can you help me with a expression that can do something like that?

neelamsaroha157
Specialist II
Specialist II

what results are you getting with below expression

= Count(Aggr(Only({$<ID = e({<[Closure Code]={wrong module','Transferred to a new module'}>}),[State] = {'Pre','Invalid'}>} [Case Count]),AutoID))

Anonymous
Not applicable
Author

I am getting  more records that the one without the state field. That's why I am thinking it's not working well. Because should exclude both.

neelamsaroha157
Specialist II
Specialist II

Try this

= Count(Aggr(Only({$<ID = e({<[Closure Code]={wrong module','Transferred to a new module'}>}),[State] -= {'Pre','Invalid'}>} [Case Count]),AutoID))

Anonymous
Not applicable
Author

I did, didn't work, if I uses only one condition inside the e() it works, but when I add the ',' and the second field it excluded both conditions

Anonymous
Not applicable
Author

Any idea on how to have 2 exclusions in one expression? when I have added the second field none of the exclusions worked.