Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasshana
Creator III
Creator III

selection in one filter should not affect other filter

Hi,

I've below two Filters Pane's.

Year

2022

2023

2024

2025

2026

 

Sale Year

2017

2018

2019

2024

2025

 

So my requirement is if I make selection in Year Filter Pane (ex: 2025) it should not affect Sale Year Filter Pane. I Know we can achieve it via alternate state, apart from alternate state is there any other method to achieve it? Those two fields are from different tables and they have been linked via common column between both the tables.

Regards,

V

4 Replies
anat
Master
Master

you may create inline table for SalesYear_dummy like below

load [sales year] as salesyear_dummy resident sales:

then use salesyear_dummy field as a filter in frontend

you have to change set expression like below

sum({<salesyear_dummy=p([sales Yesr])>}sales)

 

老肉肉
Contributor II
Contributor II

1、集合分析语法隔离
使用{<字段名={值}>}语法限定过滤器作用域,例如sum({<产品名称={"美式中杯"}>} 数量*价格)确保仅作用于指定字段,不干扰其他维度筛选‌

2、通配符排除干扰
当需排除特定值时,采用{<字段名={“*”}-{“排除值”}>}语法(如sum({<咖啡种类={“*”}-{“美式”}>}销售额)),避免空值干扰其他过滤器联动‌

3、TOTAL函数保持全局值
在计算占比等指标时,使用sum(total 数量*价格)获取不受当前筛选器影响的全局总值,防止局部筛选污染整体数据‌

Kaushik2020
Creator III
Creator III

If you are looking for a comparative analysis in your dashboard where the user need to see data based of these YEAR filters separately, you can use the state option in Qlik Sense.

Under Master items --> Create State. here i created one with name CustomState. see below image

kaushi2020_1-1754455086697.png

Keep 2 separate filters. Assign the alternative state which we created earlier to the filter pane.

kaushi2020_3-1754455288257.png

with this, the first filter pane will have the default state and the other will have the custom state. These state option is used in Qlik Sense, if the user wish to compare the data with one set of data with another. Here these filters will work parallelly. 

 

 

 

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @vikasshana 

The suggestions from @anat to use data islands (i.e. having fields that are not joined to the rest of the data model in any way) and @Kaushik2020 to set up Alternate States are both valid.

Another way to deal with it is to use set analysis to ignore selections in fields you don't want. To do this, list the fields you want to ignore selections in and follow them with an equals sign.

So to ignore sale year when looking by year you would have:

sum({<[Sale Year]=>}Stock)

And then to ignore year when looking at sales it would be:

sum({<Year=}>}[Sales Value])

What you probably will need to do though is ignore other fields also, probably all fields in one table when looking at the other. To do this you will need to list all the fields:

sum({<[Sale Year]=,[Sale Month]=,[Sale Date]=>}Stock)

This could get to be quite a long list, so I would typically create variables for the fields that I need to ignore. So, vIgnoreSales would have:

[Sale Year]=,[Sale Month]=,[Sale Date]=,etc...

And then the expression would be:

sum({<$(vIgnoreSales)>}Stock)

Hope that all makes sense and points you in the right direction.

Cheers,

Steve