Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

expression change

hi guys,

Dimension is : =Aggr(Date(Floor(DATE),'DD/MM/YY'),TicketNumber)

Expression is:

=Count({$<ID={1},TYPE={'In','Ext','Out'}>}1)

The above combination is giving perfect result out put as "total count of first id of ticket number" by date,but i need last id of ticket insted of first id number, last id will not be constant.

can u suggest some thing for that expression?

thanks

7 Replies
sunny_talwar

Not sure what you trying to do, would you be able to share a sample?

Not applicable
Author

hi,

i'm trying to count number of tickets by date for max_id/latest_id and type of ticket is should be 'In',ext, or out.

I'm looking some thing like the belwo output:

  

Input
DateTicketnumber  Typeid
1/12/2015100  In1
1/12/2015100  In2
1/12/2015101  out1
1/12/2015101  out2
1/12/2015101  out3
1/12/2015200  ext1
1/12/2015200  ext2
1/13/2015200  ext3
1/13/2015200ext4
1/15/2015300ort1
output
Date          count
1/12/20153
1/13/2015

1

thanks

Not applicable
Author

any help?

sunny_talwar

Are you over complicating things? May be you just need this:

Dim: Date

Expression: =Count(DISTINCT{<Type={'In','ext','out'}>} Ticketnumber)


Capture.PNG

Not applicable
Author

hi,thank for this.

I do not think DISTINCT will take max id for the above suggested expression calculation.

am i right? else pls correct.

sunny_talwar

It won't, but not sure why you want to count just the max? the result should still be the same, isn't it?

Not applicable
Author

yes,tht's right...In real time data will come different ways there is possibility..so i need to focus on only max one.

thanks for your help.