Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
See why Qlik was recognized for the seventh year in a row – and discover how we can help you tackle your data integration challenges. Get the report
cancel
Showing results for 
Search instead for 
Did you mean: 
izmingazov
Contributor III
Contributor III

Count records with max date (over ID)

Hello everyone,


I have the following data:

ID Date DateType
101.05.2018Special
110.03.2018General
212.04.2018Special
206.09.2018Special
216.01.2018Special
325.10.2018General
303.03.2018Special

The task is to draw the chart with date dimension and expression like:

Count(DISTINCT {%DateType={'Special'}>} ID). But need to display only max(date) for ID.


So, desired result:

IDDateDateType
101.05.2018Special
206.09.2018Special
303.03.2018Special


How can i achieve this?

tnx in advance.

3 Replies
mtucholski
Creator
Creator

Hello, try this calculated dimension:

aggr(max({<DataType={Special}>} Date),ID)

mtucholski
Creator
Creator

Sorry, it should be like that:

=if(DataType='Special',aggr(max({<DataType={Special}>} Date),ID),Null())

and suppress null values.

Przechwytywanie.JPG

sunny_talwar

Have you tried using Max(Date) where %DataType is Special as your expression?

Date(Max({%DateType={'Special'}>} Date)