Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
raajeshn
Partner - Creator
Partner - Creator

How to find the MaxDate for a Calculated Expression

Hi QlikViewers,

Requesting your help here. I have a Straight Table in QlikView Application. In addition to this chart, I have multiple filters. Chart will be responding to the selections made in these filters. Each time the selection is made, the max month may change depending upon the filters.


Table.png      Table2.png

Now, will it be possible for us to get the Max Month from the above chart (in the first case, it will be Mar-13 and 91 - and in second case it will be Dec12)? Essentially, I would want to display the max month, min month and total number of months shown in the chart in a separate text objects.

Appreciate your support.

Thanks & Regards,

Raajesh N

12 Replies
sushil353
Master II
Master II

have you tried to use

Max(EventMonth)

Min(Eventmonth)

raajeshn
Partner - Creator
Partner - Creator
Author

Hi Sushil,

Thanks for the quick response.

However, that will not work - because, I am using a set expression in Expression used for No. of Events. Hence, I would that information to be derived from Chart.

Thanks & Regards,


Raajesh N

Gysbert_Wassenaar

Something like this:

=FirstSortedValue(EventMonth, -[No. of Events])

or if No. of Events is an expression that counts events:

=FirstSortedValue(EventMonth, -aggr(max(aggr(count([No. of Events]),EventMonth)),EventMonth))


talk is cheap, supply exceeds demand
sushil353
Master II
Master II

Please post your sample application

Not applicable

try this

max(date(date#(EventMonth,'MMM-YY'),MMM))

raajeshn
Partner - Creator
Partner - Creator
Author

Hi Gysbert,

Thanks for the response. However, this gives me an unexpected answer.

I will create a mock by tomorow and upload it by tomorrow.

Thanks & Regards,

Raajesh N

raajeshn
Partner - Creator
Partner - Creator
Author

Sushil - I will create a mock and update it by tomorrow.

Thanks & Regards,


Raajesh N

raajeshn
Partner - Creator
Partner - Creator
Author

Viswa - I am not trying to change the format. Basically, I need the total number of Rows, Min(Month Year) and Max(Month Year) from the chart.

Thanks & Regards,

Raajesh N

Not applicable

try this in a separate text-box:

=MIN(EventMonth) & ',' & MAX(EventMonth) & ',' & count(distinct EventMonth) & ' months'