Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Not applicable

Last Date, not working

Hi all,

I have a very 'simple' question, but I just can't figure it out.

I have a value date (date_value). All these dates have a value (Rv) behind them, for example

1-1-2011,  5

18-2-2011, 8

27-3-2011  6

How can I standard only show the last date and attached value?

The table is updated frequently (loaded from an .xls datasheet).

The gauge I'm creating, should only show the last date and it's value.

How do I create this?

In dimension:

" =max(date_value) "

gives me an error.

If I place " =date_value " it shows all the dates and values. But that I don't want.

In expression, the attached value is shown (Rv)

How can I fix this? Tried all different things, but none worked to automatically show me the last date and attached value.

Hopefully it's clear.

Thanks in advance.

1 Solution

Accepted Solutions
Not applicable

Last Date, not working

Hi Nijsen,

Try the below expression in a text object.

=sum({<date_value={"$(=max(date_value))"}>} Rv)

If this doesnt work, you need to find out if date_value is a date type which can be found thru field tags in table viewer.

Regards,

Kiran.

View solution in original post

3 Replies
Not applicable

Last Date, not working

Hi Nijsen,

Try the below expression in a text object.

=sum({<date_value={"$(=max(date_value))"}>} Rv)

If this doesnt work, you need to find out if date_value is a date type which can be found thru field tags in table viewer.

Regards,

Kiran.

View solution in original post

Not applicable

Last Date, not working

Thanks Kiran,

that was indeed the solution.

Not applicable

Re: Last Date, not working

One 'extra' question, don't know if I have to place it here (might be a little modification)

Last 10 dates instead of last 1.

Thanks in advance.

Thanks to an other topic, I found the solution after modifications.

the solution:

=IF(

aggr(

rank(total

aggr( (date_value),date_value)

,0,1)

,date_value)

<=10,

aggr(

rank(total

aggr( (date_value),date_value)

,0,1)

,

date_value))