Qlik Community

Qlik DataMarket Discussions

Discussion Board for collaboration regarding Qlik DataMarket.

rammuthiah
Contributor II

How to display the value based on last generated report weekend?

I want to show the value for only last generated report weekend. (i.e) for 05/22/16 -->2Data.jpg

1 Solution

Accepted Solutions
MVP
MVP

Re: How to display the value based on last generated report weekend?

If you need to aggregate your Values, maybe like

=FirstSortedValue( Aggr(Count( FIELD) , Date), -Aggr(Date,Date) )

4 Replies
MVP
MVP

Re: How to display the value based on last generated report weekend?

Take care your Date field values are interpreted as dates (having numeric representation):

e.g. using

SET DateFormat = 'MM/DD/YY';

in your load script.

Then, in the front end, You should be able to use something like

=FirstSortedValue(Value, -Date)

or maybe

=Only({<Date = {$(=Date(Max(Date),'MM/DD/YY'))}>} Value)

rammuthiah
Contributor II

Re: How to display the value based on last generated report weekend?

Thanks for your reply. Here I missed something. In my application, i need to calculate the count of pending on weekly basis. For instance : Pending for Last week is 50 and for Current week is 20. It has been shown in line chart. But in KPI, I need to display the current week pending count, our expression doesn't work.

MVP
MVP

Re: How to display the value based on last generated report weekend?

If you need to aggregate your Values, maybe like

=FirstSortedValue( Aggr(Count( FIELD) , Date), -Aggr(Date,Date) )

rammuthiah
Contributor II

Re: How to display the value based on last generated report weekend?

Thanks. It works.

Community Browser