IN function not working as expected in list with null values

I am using this simple calculated field:

ifelse( in({province},${paramProvince}), TRUE, FALSE )

paramProvince is a parameter obtained from the field province, and I am using it as a filter. It includes every province of Spain plus the null value.

Then I created a table, with province as rows and the calculated field as value (sumed). Here is the thing:

  1. If I select all in paramProvince, only null values show.

  2. If I unselect NULL, data from not null provinces appear.

What I expect is that in case 1, not null provinces should also appear along with null.

Am I missing something?
Thanks for your time!

Hi,

I see you are doing a Sum of _test, that is why you get these results. Try doing a Count on the field.

Hope this helps.

Kind regards,
Andres.

1 Like

Hi Andres, thanks it works!

1 Like