Qlik Community

Ask a Question

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Qlik Highlights 2020 Giveaway! Watch, reply and have a chance to win a $200 Amazon Gift Card! Watch Video
cancel
Showing results for 
Search instead for 
Did you mean: 
Creator II
Creator II

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
Creator II
Creator II

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

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

Creator II
Creator II

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?

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

Creator II
Creator II

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?

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))

Creator II
Creator II

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.

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))

Creator II
Creator II

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

Creator II
Creator II

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