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

Show dimension ignore selection

I have two charts, the 1st chart follows the selected dimension and the second chart's dimension will be other than selection

Below is the data, for some reason, the figure of quarterly is not the sum of monthly, and also yearly

The first chart will show the selected PERIOD_TYPE, and default to be monthly

On second chart, if the selected type is 'Monthly', it will show quarterly data 2016-Q1 and 2016-Q2; if the selected type is 'Quarterly', it will show the yearly figure.  The problem is that if I selected 'Monthly', Qlik will filter out all 'Quarterly' dimension and thus show nothing.

PERIOD_TYPEPERIOD_NAMEPERIOD_VALUE
Monthly2016-011
Monthly2016-022
Monthly2016-033
Monthly2016-044
Monthly2016-055
Monthly2016-066
Quarterly2016-Q18
Quarterly2016-Q220
Yearly201630

Load * Inline

[

PERIOD_TYPE,PERIOD_NAME,PERIOD_VALUE

'Monthly','2016-01',1

'Monthly','2016-02',2

'Monthly','2016-03',3

'Monthly','2016-04',4

'Monthly','2016-05',5

'Monthly','2016-06',6

'Quarterly','2016-Q1',8

'Quarterly','2016-Q2',20

'Yearly','2016',30

];

Filter Pane

Dimension

PERIOD_TYPE

Bar Chart 1

Dimension:

if (getSelectedCount(PERIOD_TYPE) = 1, PERIOD_NAME, if (PERIOD_TYPE = 'Monthly', PERIOD_NAME))

Measure:

Sum(PERIOD_VALUE)

Bar Chart 2

Dimension:

if (GetFieldSelections(PERIOD_TYPE) = 'Monthly',

    if (PERIOD_TYPE = 'Quarterly', PERIOD_NAME),

    if (PERIOD_TYPE = 'Yearly', PERIOD_NAME))

Measure:

Sum(PERIOD_VALUE)

1 Solution

Accepted Solutions
sunny_talwar

Is this what you want?

Capture.PNG

Capture.PNG

If yes then you need to change the expression for your second chart to one of these based on your requirements:

=Sum({1}PERIOD_VALUE)

or

=Sum({<PERIOD_TYPE>}PERIOD_VALUE)

View solution in original post

5 Replies
tresesco
MVP
MVP

Assuming your first chart is working fine. Try including {1-$} to ignore selection (other than selection) in the second chart like:

Measure:

Sum( {1-$} PERIOD_VALUE)

sunny_talwar

Is this what you want?

Capture.PNG

Capture.PNG

If yes then you need to change the expression for your second chart to one of these based on your requirements:

=Sum({1}PERIOD_VALUE)

or

=Sum({<PERIOD_TYPE>}PERIOD_VALUE)

Not applicable
Author

Thanks.  This is what I need

Not applicable
Author

Thanks, what is the difference between

Sum({1-$} PERIOD_VALUE)

and

Sum({1} PERIOD_VALUE)

sunny_talwar

{1-$} -> Show everything, but exclude current selections

{1} -> show everything regardless of any selection