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

Pie Chart Refering to Data Selected

Hi Everyone,

Here is the situation:

I have a table with 6 columns, Company Name, etc etc, then an expression which works out the value of the company:

round(sum (DISDASH_Deb_Spend_Value))

I worked out how to get the top 10, 20 etc with a variable and a slider, not a problem. The top 20 is defined by the value of the company

I then wanted a pie chart showing the split of market sector. This works great, however it doesn't look at the top 10, 20, it's looking at everything, how do i fix this? In my pie chart at the minute, I've got a dimension of market_sector, and an expression of count(market_sector). I tried changing the expression to this:

Count({<rank(sum([DISDASH_Deb_Spend_Value]))<=vTopN>} [DISDASH_Market_Sector])

However I've got an error in set modifier expression with this. Can anyone help? I don't know if aggr is the way forward, I don't really understand it.

Kind Regards,

Miles

2 Replies
swuehl
MVP
MVP

From the HELP:

A set can be modified by an additional or a changed selection. Such a modification can be written in the set expression. The modifier consists of one or several field names, each followed by a selection that should be made on the field, all enclosed by < and >.

So you need to state the field you want to modify. Then you need to use an advanced search in your modifier (see also the Help for details), so if you want to rank per Company, it might look like:

=count (

{<Company = {"=rank(sum([DISDASH_Deb_Spend_Value]))<=$(vTopN)"} >}

[DISDASH_Market_Sector])

Not applicable
Author

Hi Swuehl,

Thank you for explaining that to me, I now understand how that filter

works. However, int this case, even though there is no error, the

expression is ignoring the ranking and still counting everything.

Is ranking even the way forward with this? I don't know I'm lost,

Kind Regards,

Miles

On Thu, Aug 16, 2012 at 11:08 AM, swuehl <