Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

below, above and set analysis problem

Hi

I've got a table like this:

vehicleCat,vehicleNum

1,001

2,002

3,003

4,004

5,001

6,002

7,003

8,004

I need a pivot table with vehicleCat and vehicleNum as Dimension, below({$1} vehicleNum) and above({$1}vehicleNum) as Expression.

I must select a vehicleCat but i want see the below and the above vehicleNum of all the vehicleCat.

obviously above({$1}vehicleNum) doesn't work, suggestion?

4 Replies
swuehl
MVP
MVP

Try using

=aggr( below(total only({1} vehicleNum)),vehicleCat, vehicleNum)

resp.

aggr( above(total only({1} vehicleNum)),vehicleCat, vehicleNum)

as expressions.

Regards,

Stefan

Not applicable
Author

probably it works, but i haven't got much ram to see it

(my table is like the one i posted, but biiiiigger)

swuehl
MVP
MVP

I just noticed that you were using set identifier {$1}, not {1}.

(Well, I would probably have used {<vehicleCat=>}, {$1} is problematic if you do successive selections on vehicleCat.

Do you need to be sensitive to selections here (apart from limiting the dimension to vehicleCat)? If not, could the link to above and below be done in the script instead?

Not applicable
Author

with a selection on date it works! thank you