Announcements
cancel
Showing results for
Did you mean:
Creator II

## Qlik sense set analysis – failing when filter applied.

Below formula gives output works when user dont make any manual selection on "IncomingDate" field.

count({<IncomingDate = {'\$(=only({<[Period]={'YTD'}>}PreviousYearCalculation))'}>} Quantity)

For “Period” as ‘YTD’, value in PreviousYearCalculation is

By default this is how above formula looks like:

count({<IncomingDate={">=1/7/2021<30/5/2022"}>} [Quantity])

When user apply “IncomingDate” filter we are getting “0” as value. If we apply filters on any other field, above formula works fine.

Why are we getting zero value when we apply filter on “IncomingDate” field? How do I overcome this issue?

Below formula (ignoring) field works, but this require me to exclude 100’s of field so this is not practically possible for me.

count({ 1 <field1=\$::field1,field2=\$::field2,IncomingDate = {'\$(=only({<[Period]={'YTD'}>}PreviousYearCalculation))'}>} Quantity)

Any help will be greatly appreciated.

Labels (4)

• ### Set Analysis

1 Solution

Accepted Solutions
Partner - Creator II

You can duplicate the IncomingDate Field and use the nextone into the formula and the previous in filter. In you expression you need only to exclude the filter field

example

count({<IncomingDateNew={">=1/7/2021<30/5/2022"} , IncomingDate= >},([LOS(Min)])

3 Replies
Partner - Creator II

You can duplicate the IncomingDate Field and use the nextone into the formula and the previous in filter. In you expression you need only to exclude the filter field

example

count({<IncomingDateNew={">=1/7/2021<30/5/2022"} , IncomingDate= >},([LOS(Min)])

Creator II
Author

@menta thank you for the reply. I tried that but still having same issue. Zero value when the duplicate field is selected.

Creator II
Author

found the issue. Filter i was using was "MonthName(IncomingDate)". For some reason this is causing the issue with the set analysis.

Thank you @menta for pointing me right direction. I created another field called "IncomingDate_MonthName" and used it in the filter. Also included this newly created field within the set analysis as @menta mentioned above.