Im using a CQWP and need to display all items that have a column that is empty. The column is a lookup but I've tried a normal (single line of text) column but cqwp shows no filtering for null or empty values.
2 Answers
Workaround - create new Calculated column "Display".
Formula should be: =IF(LEN(LookupCol)=0;"Yes";"No").
Eventually, make a filter based on Display column: Show items when Display is equal to Yes.
To further Tomislav's answer, set the calculated column to return Yes/No:
=IF(LEN(LookupCol)=0,1,0)
Then filter the CQWP with Display = 1
Edit: This doesn't work because apparently the generated CAML Query always sets the field type to text for calculated columns, according to this: https://github.com/pnp/sp-dev-fx-webparts/issues/758
0;#
as this is the equivalent to a empty lookup column.