Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
DutchArjo
Contributor III
Contributor III

How to set set analysis for some variables but not all?

I have a set analysis function that limits the range of values shown on the horizontal (x)-axis of my chart.

I read about set analysis expressions and basically saw 2 options:

Common identifiers
Identifier Description
1 Represents the full set of all the records in the application, irrespective of any selections made.
$ Represents the records of the current selection. The set expression {$} is thus the equivalent to not stating a set expression.

 

but, to me, this says me you either have to choose to ignore all selections or ignore nothing. I would like to be able to ignore specific selections. Is that possible?

example: I have the x-axis range defined by showing only the last 2 years of data. When I use Identifier 1, it works like I want to for the values shown on the x-axis. But then, none of the other selections has effect on the chart.

When I use identifier $ the chart is effect by every other selection I make, also for the periods on the x-axis.

I would like to have several filter to have effect on the chart, but not for the time period on the x-axis. That should always be the last  years.

 

Is this possible and how?

 

 

Labels (6)
1 Solution

Accepted Solutions
DutchArjo
Contributor III
Contributor III
Author

thanks.

 

But now an example: I set my x-axis range bij set expression using calculation year/month periods.

But then I cannot also set this variable to ignored can I?

 

this is my set expression:

=Sum({<DCE_IsoJaarWeek1={">=$(=((Year(Today())-2)*100)+week(today()))<=$(=((Year(Today())*100)+week(Today())-1))"}, PRO_Domein={"MTV*"}>} [#CON_Controles])

 

I do not want a selection in DCE_IsoJaarWeek to affect my chart, but in the set analysis expression, I cannot also use {<DCE_IsoJaarWeek=>} can I?

 

I then thought: I can use an alternative state for this. But then I wanted a different variable to affect both state 1 and state 2, but that was not possible?

 

Example:

I have these variables in my worksheet:

Time

Team

 

My chart is assigned to alternate state 1. 

This chart should not be affected by selections in 'Time'. So Time is not assigned to 'alternate state 1' .

'Team' however should have effect on both, original state and alternative state 1.

Edit:

 

I found a/the solution for my situation with the help of this topic:

https://community.qlik.com/t5/QlikView-App-Dev/One-Filter-for-Two-Alternate-States/td-p/727158

 

I changed my formula (different from the mentioned set expression in my reply/question) to:

=count({<[GAA_Controle]={'Ja'}, PRO_Centrumbrigade={[standaard_state]}>} GAA_Controle)/count(GAA_Controle)

 

Where I have created an alternate state for the chart.

 

 

View solution in original post

2 Replies
MatheusC
Specialist
Specialist

@DutchArjo 

For specific selections, use within your set analysis in this way, with your field to ignore:

{<Field=>}

If there is more than one field, separate them by commas,

{<Field=,Field2=>}

Regarts, Matheus

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!
DutchArjo
Contributor III
Contributor III
Author

thanks.

 

But now an example: I set my x-axis range bij set expression using calculation year/month periods.

But then I cannot also set this variable to ignored can I?

 

this is my set expression:

=Sum({<DCE_IsoJaarWeek1={">=$(=((Year(Today())-2)*100)+week(today()))<=$(=((Year(Today())*100)+week(Today())-1))"}, PRO_Domein={"MTV*"}>} [#CON_Controles])

 

I do not want a selection in DCE_IsoJaarWeek to affect my chart, but in the set analysis expression, I cannot also use {<DCE_IsoJaarWeek=>} can I?

 

I then thought: I can use an alternative state for this. But then I wanted a different variable to affect both state 1 and state 2, but that was not possible?

 

Example:

I have these variables in my worksheet:

Time

Team

 

My chart is assigned to alternate state 1. 

This chart should not be affected by selections in 'Time'. So Time is not assigned to 'alternate state 1' .

'Team' however should have effect on both, original state and alternative state 1.

Edit:

 

I found a/the solution for my situation with the help of this topic:

https://community.qlik.com/t5/QlikView-App-Dev/One-Filter-for-Two-Alternate-States/td-p/727158

 

I changed my formula (different from the mentioned set expression in my reply/question) to:

=count({<[GAA_Controle]={'Ja'}, PRO_Centrumbrigade={[standaard_state]}>} GAA_Controle)/count(GAA_Controle)

 

Where I have created an alternate state for the chart.