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: 
JohnSpot
Contributor
Contributor

Top function not functioning as intended

Hello all,

 

Thanks in advance for the time you will dedicate to my topic !

I am trying to retrieve the first value of a column (which looks straighforward 🙂 ) and elected to use the Top function.

JohnSpot_0-1635349190509.png

Super simple. But when I display Top(saEntite), it does not work but displays invalid function.

Is there something obvious I am missing ?

Would anyone have any advice ?

Thanks a lot !

Cheers,

Guillaum

1 Solution

Accepted Solutions
rubenmarin

Hi, I'm not suere why it doen't works, if you have a field Dim1 with values A,B,C and you use Top(Dim1) it will show 'A' on all rows.

rubenmarin_0-1635669376853.png

Note that this is an expression, maybe you are trying to use it as dimension instead of as expression?

As a Dimension it could be something like :=Aggr(If(Dim1=Top(Dim1), Dim1), Dim1)

 

View solution in original post

2 Replies
rubenmarin

Hi, I'm not suere why it doen't works, if you have a field Dim1 with values A,B,C and you use Top(Dim1) it will show 'A' on all rows.

rubenmarin_0-1635669376853.png

Note that this is an expression, maybe you are trying to use it as dimension instead of as expression?

As a Dimension it could be something like :=Aggr(If(Dim1=Top(Dim1), Dim1), Dim1)

 

JohnSpot
Contributor
Contributor
Author

Holly molly,

You make life look easy.

 

It worked. Thanks a lot !