Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Exists() question!

Hi people!

I am trying to pick records from a transactions qvd-file using the exists() function. Like this:

LOAD %Date,

     %GL_Date,

     'Transactions REG' as Source,

     %ExecutingDepKey,

     %ResponsibleDepKey,

     %Project,

     %EmpNo,

     %ProjectTaskKey,

     %Activity,

     QuantityRegistered as [Registered Quantity],

     BillingPriceRegisteredBase as [Registered Billing Price],

     CostPriceRegisteredBase as [Registered Cost Price],

     QuantityInvoiced as [Invoiced Quantity],

     BillingPriceUpDownBase as [Up/Down],

     QuantityUpDown as [Up/Down Quantity],

     BillingPriceInvoiceBase as [Invoiced Billing Price],

     OrigReveueRecognizedBase as [Revenue Recognized at Registration],

  RevenueRecognizedBaseChange as [Revenue Recognized at Invoicing]

FROM

$(DataStagePath)\FACT_Transactions.qvd

(qvd)

Where Exists(%ResponsibleDepKey) OR Exists(%ExecutingDepKey)

;

But the where statement gives me all transactions. When I use only one of the conditions it works.

Can I not use exists() with an OR?

Best regards
Trond E

4 Replies
tresesco
MVP
MVP

I am sure that you must be sure, still, to confirm let me ask - are you sure that you want exists() and not NOT exists()  ?

rustyfishbones
Master II
Master II

you can say

WHERE EXISTS (%ResponsibleDepKey , %ExecutingDepKey)

jagan
Partner - Champion III
Partner - Champion III

HI,

Can you attach full script, it is difficult to understand.

Regards,

Jagan.

rbecher
MVP
MVP

I guess you mean AND?

Where Exists(%ResponsibleDepKey) AND Exists(%ExecutingDepKey)

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine