Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

andriesb
Contributor

Show one 'line with latest date' comment

within a chart i would only show the  'Comment' for  LAST 'datum volgende actie' line.

I could calculate the last date of these three lines using   max(TOTAL([datum volgende actie]))  but how to script this within the chart to only show me the last comment?

How do i have to express the script to show only the comment due latest : this should be the line where 'date volgende actie' = 29-03-2013' .I would like to add my code within this chart/ expression.

What is the syntax for this 'filtered' comment:

The result should be:

1 Solution

Accepted Solutions

Re: Show one 'line with latest date' comment

You can use the firstsortedvalue function to get the comment for the latest date:

firstsortedvalue(CommentField, -DateField)

Keep in mind that the firstsortedvalue can only return one value, so if there are more comments for the maximum date (for the same combination of dimension values that is) then firstsortedvalue will return null.


talk is cheap, supply exceeds demand
5 Replies

Re: Show one 'line with latest date' comment

You can use the firstsortedvalue function to get the comment for the latest date:

firstsortedvalue(CommentField, -DateField)

Keep in mind that the firstsortedvalue can only return one value, so if there are more comments for the maximum date (for the same combination of dimension values that is) then firstsortedvalue will return null.


talk is cheap, supply exceeds demand
andriesb
Contributor

Re: Show one 'line with latest date' comment

Thanks Gysbert, it works!

I though I could do the trick using a custom filtered comment, but this syntax fails...

= {< [Datum volgende actie] = ${ActiedatumLast}  >} Gespreksnotitie

where ActiedatumLast is the 'max date'

Shouldn't it be possible to add a custom filter in this way?

Re: Show one 'line with latest date' comment

maxstring({< [Datum volgende actie] = {$(ActiedatumLast)}  >} Gespreksnotitie) might work as long as [Datum volgende actie] isn't a dimension in your chart.


talk is cheap, supply exceeds demand
andriesb
Contributor

Re: Show one 'line with latest date' comment

One more question:

How could I show  a max date where it should be calculated for each unique invoice nr?

=max ({< [Invoice Nr]  >} TOTAL([Actiedatum]))

andriesb
Contributor

Re: Show one 'line with latest date' comment

my last question solved:

I searched for the max date within multiple dimentions using the aggr function:

= aggr(max(([Date next action])), Invoice_Number) 

Community Browser