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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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

Labels (1)
4 Replies
tresB
Champion III
Champion III

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
Partner - Master III
Partner - Master III

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