Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Chart Data Exclusion

Hi All,

I have a built a chart showing student data with my dimension by Grade.

My data has some grade values that I need to filter out for this specific chart:  IN (independent study), 99 (Adult study).

I want these values in my listboxes and other modules, just not in the chart.

How can I exclude 'IN' and '99' from my dimension in just this chart?

Also, for future reference: how can this be done in the script to prevent these values from showing up anywhere in the application?

I have tried to use conditional formatting in my dimension - not sure if I am on the right track though.

Thank you!

1 Solution

Accepted Solutions
Not applicable
Author

10 Replies
Not applicable
Author

You can use either an IF statement or set analysis in order to filter it out for just one chart.  In the script, you can use a WHERE statement.

Set analysis:

Sum({$<Value-={'IN','99'}>} StudentGrade)

Script:

LOAD
yourfields here

FROM

source here

Where Value<>'IN' and Value<>'99';

Note that if you put it in the script, those values will no longer appear in your list boxes, etc.

Anonymous
Not applicable
Author

Rebecca,

I believe that I would need to exclude these values without aggregation. 

My current expression is:  count(if(L1Saved='1',L1Saved))/(count(studentId))

Thank you for answering my secondary question - that definately helps if I would need certain values to be excluded entirely.

Not applicable
Author

Sounds like you need something like this:

Count(({$<L1Saved={'1'},Value-={'IN','99'}>} L1Saved)/Count({$<Value-={'IN','99'}>} studentId)

Anonymous
Not applicable
Author

Hi Rebecca this did not work for me - gave me "no data to display"

Not applicable
Author

Okay, then I would have to see your data.  Do you have a sample file?

Anonymous
Not applicable
Author

Here is a sample file where I would need to exclude grades PK and 99

prodanov
Partner - Creator
Partner - Creator

Try this:

count({<Grade-={'99','PK'}>} if(L1Saved='1',L1Saved))/(count({<Grade-={'99','PK'}>}studentId))

Not applicable
Author

See attached.

Anonymous
Not applicable
Author

Thank you Prodanov, This works!