Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
aveeeeeee7en
Specialist III
Specialist III

Logic in Pivot Table

Hi Community

See the Attachment

Regards

Aviral Nag

12 Replies
Not applicable

Maybe you can use this:

Count(DISTINCT if(aggr(nodistinct max(CompletedDate),MaxState)=CompletedDate,TicketID))

Attached.

aveeeeeee7en
Specialist III
Specialist III
Author

Thanks Ajay for your reply but your logic is not working.

If you select Feb 2014 from field Monthname and Select India from field State it will show you 6 Tickets whereas from your formula i am getting 1 Ticket.

Not applicable

For the selections you mentioned the max date in Completed Date is 27/02/2014 for which there is just one 

TicketID - 110.

Should a different logic be used to calculate that.

aveeeeeee7en
Specialist III
Specialist III
Author

If You Go to Edit Script, than you'll see that i have picked the 2nd Max Completed Data "Key" wise.

So, the Max Date will come different for each case.

aveeeeeee7en
Specialist III
Specialist III
Author


  • Any Suggestions.
PrashantSangle

Hi,

Use this as your expression

Aggr(Count(DISTINCT TicketID),TicketID)

Checked enclose file,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
aveeeeeee7en
Specialist III
Specialist III
Author

Thanks for your reply.

This is not what I want..  Kindly read the post and see the Attachment.

tresesco
MVP
MVP

Try :

Count({<State=p(MaxState)>}DISTINCT TicketID)

aveeeeeee7en
Specialist III
Specialist III
Author

Thanks Tresesco for your reply.

There were some minute discrepancies. Not able to understand how to tackle it.

See the Attchment.