Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
WEBINAR April 23, 2025: Iceberg Ahead: The Future of Open Lakehouses - REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
jay_pee
Contributor II
Contributor II

Set Analysis modifier to force selection of one field

Hello, is it possible to set a 1 modifier to a specific field in a set analysis group? I'm trying to force the Filter.date value to always show the last 6 months, even if a user has selected different months in the filter.

In our dashboard we have a bar chart displaying the previous 6 months of data but as soon as a user updates the date filter to fine tune other charts/tables on the same page, the bar chart updates and some of the last 6 months disappear. I would like to keep the 6 months constant but just show 0 instead. Is this possible using the 1 set modifier in the date field somewhere? All other data still needs to be filterable.

Count(Distinct { <
[NCR.IsSupplier]-={1},
[Filter.Type]={'NCR'},
[Filter.SubType]={'Created'},
Filter.Date={"$(='>=' & MonthStart(Today(), -6) & '<=' & MonthEnd(Today(), -1))"}
>} [NCR.Name])

If I set the 1 modifier in the opening curly brace it obviously makes all data constant and not filterable but I don't want that, only the date range to be constant.

Thanks in advance, J

Labels (5)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

Try adding sum({1}0) to your expression.

Count(Distinct { <

[NCR.IsSupplier]-={1},

[Filter.Type]={'NCR'},

[Filter.SubType]={'Created'},

Filter.Date={"$(='>=' & MonthStart(Today(), -6) & '<=' & MonthEnd(Today(), -1))"}

>} [NCR.Name]) + sum({1}0)

View solution in original post

2 Replies
Vegar
MVP
MVP

Try adding sum({1}0) to your expression.

Count(Distinct { <

[NCR.IsSupplier]-={1},

[Filter.Type]={'NCR'},

[Filter.SubType]={'Created'},

Filter.Date={"$(='>=' & MonthStart(Today(), -6) & '<=' & MonthEnd(Today(), -1))"}

>} [NCR.Name]) + sum({1}0)

jay_pee
Contributor II
Contributor II
Author

That seems to work perfectly, thanks a lot @Vegar!