Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Complicated expression involving aggregation and set analysis

Hi Everyone,

I have a problem trying to work out this particular expression:

=aggr(Count({$<TimeStamp = {$(vMaxTimeStamp)},Flag = {ScriptPlaced}>} AgentCode),ProfileNo)

The Situation: We are building a model for a callcentre that phones clients (Profiles) and asks them if they can collect their repeats or their scripts from them (Pharmacies use our callcentre). When they phone a client (Profile) after the call they select a flag, basically it comes down to whether the call was successful or not, with those flags we can create compliance charts etc. Easy enough.

The Problem: 3 calls could be made to 1 profile, which means 2 could be unsuccessful and 1 (the last call) could be successful, but what i want, instead of showing a compliance of 33.333% to show a compliance of 100% because that client/Profile collected their script etc and even though 3 calls were made, it was successful in the end. So what i need to do in Qlikview is Aggregate the count of AgentCode(Calls) where the profile is equal to the Max(Timestamp) (The call date and time).

I tried to work it out (above) but it doesn't work at all.

Please would you let me know f i am going about this the right way or if you don't understand the problem.

Thanks

5 Replies
Not applicable
Author

Ok was it a good question or does no one understand me??

Not applicable
Author

Good morning Richard,

it would be very helpful if you provide a qlikview example. That´s the best way to figure out a solution.

Thank you!

Rainer

Not applicable
Author

Hi Richard,

it would be much easier for us to help you if you appload your application in here.

Milda

Not applicable
Author

For some reason i cannot upload QlikView documents, this is what it says:

File Type Not Valid

This type of file is not allowed.
You are right though, it is hard to know what i'm on about without seeing a sample.
Any tips on how to get the documents uploaded, any settings i have to change or anything??
fseregaza
Partner - Contributor III
Partner - Contributor III

Hi Richard,

I'm not sure, but I think you have forgotten the quotes in your Set Analysis. You should have something like:

=aggr(Count({$<TimeStamp = {'$(vMaxTimeStamp)'}, Flag = {'ScriptPlaced'}>} AgentCode), ProfileNo)

Please check if I'm right.

Best regards,

Franck SEREGAZA

Business & Decision