# New to QlikView

Discussion board where members can get started with QlikView.

Contributor III

## Set Analysis to find last set of observation

I am trying display in my mini graphs only the last vDays observation - so for example my vDays variable is 4 so I would like to show only 04/10/2017,03/10/2017,04/01/2017,03/01/2017 ( there are gap between the dates ).

Any idea?

Thank you

Raphael

Tags (1)
1 Solution

Accepted Solutions
MVP

## Re: Set Analysis to find last set of observation

May be one of these:

Sum({<Date = {"\$(='>=' & Date(Max(Date, \$(vDays))))"}>}Points)

or

Sum(Aggr(If(Date >= Max(TOTAL <Name> Date, \$(vDays)), Points), Name, Date))

8 Replies

## Re: Set Analysis to find last set of observation

PFA

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Contributor III

## Re: Set Analysis to find last set of observation

actually this show me the first vDays observation not the last? am am after the last, thanks

Contributor III

## Re: Set Analysis to find last set of observation

and also  04/01/2017 is treated same as 04/10/2017 so not working at all

## Re: Set Analysis to find last set of observation

First issue resolved

And, second one "and also  04/01/2017 is treated same as 04/10/2017 so not working at all" - How?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Contributor III

## Re: Set Analysis to find last set of observation

Not yet...

issue 1) I need the last set of observation (not first) so if vDays is 1 expecting to see only last observation Natalie 80 and Kim 90, not 67, 55

issue 2) it is the same Day value for month 01 and month 10 ?

Thank youy

MVP

## Re: Set Analysis to find last set of observation

May be one of these:

Sum({<Date = {"\$(='>=' & Date(Max(Date, \$(vDays))))"}>}Points)

or

Sum(Aggr(If(Date >= Max(TOTAL <Name> Date, \$(vDays)), Points), Name, Date))

Contributor III

## Re: Set Analysis to find last set of observation

The bottom on is the one I was after, many thanks

MVP

Awesome