Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Limit Pivot Table - Top 10 (with variable expression in aggr)

Hello community,

I'm trying to integrate a top X pivot table which only shows the top amounts based on the variable set for the limit.

I know I have to use a calculated dimension with aggr and rank - similar to this one:

=IF (aggr(rank( sum(Quantity) ,0) , Productname )<= 5 , Productname )

in my case, "Quantity" is a variable for Amount that looks like this:

vEurAmount:

=if(NOT Wildmatch(InvoiceCurrency,'EUR'), (Amount / (1 * ECBrate)),Amount)

So when I insert vEurAmount I get an: "Error: Garbage after expression: "EUR" "

How can I solve this issue?

Thank you,

Thorsten

12 Replies
Not applicable
Author

Thorsten,


See a doc by Oleg Troyansky : http://community.qlik.com/docs/DOC-5187

I have seen it but not time to read/understand it

It can give you clue for what you want to do

Fabrice

Not applicable
Author

Hello,

I know that this topic is solved and old, but for others who come here, i will show you how i did solve my problem with this error:

i just surrounded my variable with chr(39), the ASCII code for a '

eg: $(=Chr(39) & GetFieldSelections(ENSEIGNE_MAGASIN) & Chr(39))

Then Qlikview understand that it is a character string.

Not applicable
Author

Good evening friends

I am facing  a problem and I need your help

I try to display the first 10 sales per country in a Pivot table

sales.PNG.png

so I added this expression in dimensions

Capture.PNG.png

and as a result I have

Capture.PNG.png

as you can see  for 2010 it gives a result USA-> France-> germany   and the logical order and it

  USA-> France-> UK why?

Thank you for your answers