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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
p_noindl
Partner - Contributor III
Partner - Contributor III

Dimension Limits

Hi,

Anyone knows how to solve this issue:

I need to show only the top 10 (or the worst 10) customers sales based on the second expression (2014) . My customer insists on showing the expressions in the shown order.

I have tried it with rank in the dimensions tab ("enable conditional"), but didn't succeed.

Many thanks for your assistance!

Peter

13 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Like this?

Not applicable

See the attached qvw...

I used IF(AGGR(RANK(SUM({<Year = {'2014'}>}Sales)), Customer) <= 10,Customer)

as the calculated dimension.

p_noindl
Partner - Contributor III
Partner - Contributor III
Author

This is not the right solution, because dimension limits only work with the first expression and that is 2013. Your solution takes now the top 10 in 2013. I cannot change the expressions order.

Rank could be the solution but I didn't succedd with the syntax.

Not applicable

Did you see my attached qvw? The top 10 customers based on sales in 2014 are shown in the chart... is that not what you want?

p_noindl
Partner - Contributor III
Partner - Contributor III
Author

Sorry, my answer was related to alessandro saccone's answer - I try no to transfer your expression to my - much complicater - qvw-document and will come back soon. Do you see any solution with rank in the dimensions tab ("enable conditional") - would be more flexible in my special case? Many thanks!

p_noindl
Partner - Contributor III
Partner - Contributor III
Author

Hi Jacob,

my expressions are as follows:

Forecast Actual Year:

sum(if(KeyDate  >= vDateSelectStart and KeyDate <= vDateSelect, INV_QTY * TO_QUANTITY_DE ))/vDaysSelected * 365

Previous Year:

sum(if(KeyDate  >= yearstart(vDateSelectStart - 365) and KeyDate <= YearEnd(vDateSelectStart - 365), INV_QTY * TO_QUANTITY_DE ))

Therefore Year = 2014 is a problem in this case.

Not applicable

IF(AGGR(RANK((sum(if(KeyDate  >= vDateSelectStart and KeyDate <= vDateSelect, INV_QTY * TO_QUANTITY_DE ))/vDaysSelected * 365)), Customer) <= 10,Customer)


give it a shot

p_noindl
Partner - Contributor III
Partner - Contributor III
Author

many thanks, but I have tried this before - it works, but I am getting a value for the "others", which destroys my scaling of the axis

p_noindl
Partner - Contributor III
Partner - Contributor III
Author

have a look: