Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

whiteside
New Contributor II

How to "ignore" set filters in Calculated Fields

Dear Qlik Community,

i am facing an issue with my displaying of diagramms:

See attached graphic.

On the Right you have my diagramm without any filters, and on the left with filters.

The graph uses the Quota which is calculate like this = 1- ( ($(vCargoManifestAllErrors))/($(vCargoManifestTotal)))

Formular variables:

vCargoManifestTotal = Count(distinct([Cargo manifest no]))

vCargoManifestAllErrors =  count({<[QR1 Timestatus]={'missing data','EDI send before End of Loading'}>} Distinct([Cargo manifest no]))

I need something that "freezes" the calculation of the Quota, so that if a I set a filter the Quota does not change.

Any ideas?

Best regards

whiteside

    

6 Replies
b_knuever
Contributor III

Re: How to "ignore" set filters in Calculated Fields

Set analysis: {1<>}  would do the trick.

YoussefBelloum
Esteemed Contributor

Re: How to "ignore" set filters in Calculated Fields

Hi,

you need to modify your variables like this:

vCargoManifestTotal = Count({1} distinct([Cargo manifest no]))

vCargoManifestAllErrors =  count({1<[QR1 Timestatus]={'missing data','EDI send before End of Loading'}>} Distinct([Cargo manifest no]))

whiteside
New Contributor II

Re: How to "ignore" set filters in Calculated Fields

Thank you b.knuever‌ and thank you for your detalied help youssefbelloum‌.

IT WORKED!

However now I realized that the filter really ignores everything

I used to be able to filter to the previous month by using the button with two actions:

The buttons first actions is

Field ='Month'

Action =Month(AddMonths(today(),-1))

and the second is :

Field ='Year'

Action =if(month (Today())='Jan',year(AddYears(today(),-1)),year(today()))

After I push it, it would change set the filters to the previous month (see screenshot)

NOW with {1<>} it does not work anymore. Is there a way to deactivate only specific filters? Or what is the best way to solve this issue?

best regards

whiteside

thakkarrahul01
Contributor

Re: How to "ignore" set filters in Calculated Fields

Hi Whiteside,

You can list set of dimensions for which you want to ignore selections-

vCargoManifestTotal = Count(distinct {<Dim1=,Dim2=>}[Cargo manifest no])

vCargoManifestAllErrors =  count({<[QR1 Timestatus]={'missing data','EDI send before End of Loading'},Dim1=,Dim2=>} Distinct([Cargo manifest no]))

Regards,

Rahul

YoussefBelloum
Esteemed Contributor

Re: How to "ignore" set filters in Calculated Fields

Hi,

Like Rahul said above, you can configure your set analysis, the way you want:

you can deselect all the fields from your expression

you can let a specific number of fields connected with the expression and deselect the rest

it depends on your needs.

MVP
MVP

Re: How to "ignore" set filters in Calculated Fields

May be you need this

Set Analysis: Ignore All Selections except for one field

{1<Month = p(Month)>}

or

{1<Month = $::Month>}

Community Browser