Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating a chart with pre-defined filters

Hi, I'm trying to create a Dashboard chart with some pre-defined selections to fields.  Not sure how to do it. My data is as follows:

1) Line graph with Plan vs Actual % progress over time

ex. Jan-2014      20%     12%

     Feb-2014     30%     15%

     Mar-2014     40%     22%

2) Selection 1 is for Individual project

3) Selection 2 is for Phase of project

In practice, the chart only appears when both filters are selected as chart will not display an average/summary of all projects and all Phases.  So when I open Qlikview, for this dashboard chart, the default filters should be on, but it may not be on for all other charts and tables. 

Thanks for your advice. 

1 Solution

Accepted Solutions
JonnyPoole
Former Employee
Former Employee

Hi there -  SET ANALYSIS can only be used within the context of a chart aggregation function.  That may sound like a constraint, but its actually very unusual to have an expression in a chart that doesn't use one on purpose. I encounter this (an expression with no aggregation ) usually when its an oversight or a data model not set up correctly.

Can you post the exact expression you are using ?   Or just try wrapping it in sum() or only() or min() or something that make sense. even if you are summing only 1 possible value, its the norm to do this ...

View solution in original post

4 Replies
JonnyPoole
Former Employee
Former Employee

Do you want the users to be able to remove the selections for this one chart or always have in place  ?

SET ANALYSIS on each expression in the chart will accomplish the goal of always having a chart filtered a certain way.   If your expression was something like sum(Sales)  , the syntax would be something like:

sum(   {$<Project={'Project A'},Phase={'1'}>}  Sales)

Where Project is the project field from 2)  above and 'Project A' is the value in this field that you want to filter for. AND... Phase is the phase field from 3) above and '1' is the value in this field that you want to filter for.

Not applicable
Author

Hi. Thanks for the reply. Yes the filters should always be in place for the

chart. Secondly my expression is just Plan % over time so no summing or

averaging.

JonnyPoole
Former Employee
Former Employee

Hi there -  SET ANALYSIS can only be used within the context of a chart aggregation function.  That may sound like a constraint, but its actually very unusual to have an expression in a chart that doesn't use one on purpose. I encounter this (an expression with no aggregation ) usually when its an oversight or a data model not set up correctly.

Can you post the exact expression you are using ?   Or just try wrapping it in sum() or only() or min() or something that make sense. even if you are summing only 1 possible value, its the norm to do this ...

Not applicable
Author

Thanks.  I used only(), and could then use Set Analysis to achieve what I wanted to.