Skip to main content
Question

Hi Everyone,I am trying to Filter my data/table for entries, if two columns are empty. If they are empty I don't want to see them at all (Filter them from all my data).But the Filter (X!='' and Y!='') is not working.

  • July 12, 2023
  • 3 replies
  • 27 views

jonas.venne
Level 2

This Screenshot show my unfilteres table:

imageAs you can see I got a lot of data where my resultsqueeze and resultvalidation is empty. I want to filter those entries. What i did is Filter the whole sheet with the following statement:

FILTER ("reportdataextraction"."resultsqueeze" !='' and "reportdataextraction"."resultvalidation" !='');

 

But the statement is filtering every entry where either one of the columns is empty. This is my result: image 

What am i doing wrong?

 

Thank you for the help!

 

Bests,

Jonas Vennemann

3 replies

kailash.potha12
Level 10
Forum|alt.badge.img+6

Hi @jonas.venne ,

 

I think you have to use OR operator instead of AND because AND operator works only if both the conditions are true. OR operator will work if any one of the condition is true.


philipp.dehn
Level 10
Forum|alt.badge.img

Hi Jonas

 

to me it looks like your columns have NULL values, not '' as string values.

When you Filter on those columns, rows with NULL values are automatically excluded.

 

You may want to try something like the following:

 

FILTER "reportdataextraction"."resultsqueeze" IS NOT NULL AND "reportdataextraction"."resultvalidation" IS NOT NULL;

 

This should also work, as the COALESCE accounts for the NULL values:

 

FILTER COALESCE("reportdataextraction"."resultsqueeze", '') = '' AND COALESCE("reportdataextraction"."resultvalidation", '') = '';

 

BR Philipp


dxb.miner
Level 5
  • Level 5
  • October 25, 2024

@jonas.venne 

 

You can try below,

 

FILTER TO_STRING ("reportdataextraction"."resultsqueeze") IS NULL OR

TO_STRING ("reportdataextraction"."resultvalidation") IS NULL;