Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
yanivvl0
Contributor III

How to show rows from last and on ?

Hi to all ,

i have table of programs, for each program can be many status , i need to show all the status from IS_LAST row and on (accending)  ,

for example : to show status 20-70 BUT not status 10 :

from_last_stts.PNG

jow can i do that in straight table ( or pivot ) ?   THANKS.

1 Solution

Accepted Solutions
effinty2112
Honored Contributor

Re: How to show rows from last and on ?

Hi Yaniv,

With your data you can obtain this straight table:

program status IS_LAST
10025201
10025300
10025400
10025600
10025700
10079701
10085201
10085300
10085400
10085600
10085700

status is the calculated dimension:

=aggr(if(status >=Min(TOTAL <program>Aggr(if(IS_LAST=1,status),program,status)),status),program,status)

Regards

Andrew

7 Replies

Re: How to show rows from last and on ?

This?

Sum({<status = {">= 20 <=70"}>} program)

OR

Sum({<status -= {'10'}>} program)

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)
yanivvl0
Contributor III

Re: How to show rows from last and on ?

for this case its ok , but i need for all cases because IS_LAST can be at any status :

from_last_stts2.PNG

Re: How to show rows from last and on ?

Means?

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)

Re: How to show rows from last and on ?

If these aren't dynamically calculated in the UI, you can easily set a flag in your Load script.  Imagine your table is called "Data". Then the following could act as a guideline:

LEFT JOIN(Data)

LOAD program,

     status as LastStatus

RESIDENT Data

WHERE IS_LAST = 1;

NewData:

LOAD *,

     IF (status >= LastStatus, 1, 0) AS LastAndLater

RESIDENT Data;

DROP Table Data;

RENAME Table NewData TO Data;

effinty2112
Honored Contributor

Re: How to show rows from last and on ?

Hi Yaniv,

With your data you can obtain this straight table:

program status IS_LAST
10025201
10025300
10025400
10025600
10025700
10079701
10085201
10085300
10085400
10085600
10085700

status is the calculated dimension:

=aggr(if(status >=Min(TOTAL <program>Aggr(if(IS_LAST=1,status),program,status)),status),program,status)

Regards

Andrew

yanivvl0
Contributor III

Re: How to show rows from last and on ?

hi Andrew , great help - THANKS !!

yanivvl0
Contributor III

Re: How to show rows from last and on ?

HI Peter , i need expression , see below, thanks.