Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Exclude two first values (or not) of a Dimension

Hi. Here is my problem.

If the total number of records is greater than 12, display only the last 12

and

If the total number of records is less or equal 12, exclude the 2 first

Records >12

00. 12.png 01. 12.png 

Records <=12

012.1.png  02. 12.png

Thank You!

1 Solution

Accepted Solutions
maxgro
MVP
MVP

replace with

=date(

if(count(TOTAL d)>12,

if(aggr(rank(d),d)<=12, d, null()),

if(aggr(rank(-d),d)<=2, null(), d)

)

)

1.png

View solution in original post

4 Replies
maxgro
MVP
MVP

see attachment

Not applicable
Author

He,y thanks.

It works only when records are <=12.

When greater than 12, not.

answer.png

The result should be like this:

01. 12.png

Thanks again.

maxgro
MVP
MVP

replace with

=date(

if(count(TOTAL d)>12,

if(aggr(rank(d),d)<=12, d, null()),

if(aggr(rank(-d),d)<=2, null(), d)

)

)

1.png

Not applicable
Author

Wow! Perfect!

Thank You so much.