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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Count with trick

Hello,

Please help me to add condition, which calculate count base on product type and the latest date. Or may be different algorithm.

Some client switched from one type to other. I should calculate the latest product.

Please see my attached file.

Thanks,

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

Create a chart with dimension

=aggr(FirstSortedValue(Product,-[Close Date]), [Account Number])

and as expression

= count(distinct [Account Number])

If you want to group Ent / Pro, I would suggest doing the grouping in the script, creating a new field.

View solution in original post

2 Replies
swuehl
Champion III
Champion III

Create a chart with dimension

=aggr(FirstSortedValue(Product,-[Close Date]), [Account Number])

and as expression

= count(distinct [Account Number])

If you want to group Ent / Pro, I would suggest doing the grouping in the script, creating a new field.

Anonymous
Not applicable
Author

Thanks, Stefan.

It works for this case.

Thanks again.