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.

  • Well, i guess you could try with 0;# as this is the equivalent to a empty lookup column. Commented Dec 4, 2015 at 15:21
  • Tried equal 0;# but doesn't work :( Commented Dec 4, 2015 at 16:19

2 Answers 2


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:


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.