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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
triciagdaly
Contributor III
Contributor III

Using data comparision with set analysis within a nested IF

Please see attachment.

I have a nested IF and will first check for override price.  If null, check to see if a purchase price exists where the last purchase price date < a benchmark date field.  If this is null, then use receipt price.

I am having syntax issues with the If regarding the purchase price.

Labels (1)
1 Reply
swuehl
Champion III
Champion III

You can only use set expression in an aggregation function like sum(), count(), only() etc.

It looks like in your expression,

IsNull(CURRENT_PURCHASE_PRICE({<LAST_PURCH_PRICE_TRAN={"<=$(=date(vBenchmarkDate))"}>} ))


it's not valid syntax. Maybe you want something like


IsNull(only({<LAST_PURCH_PRICE_TRAN={"<=$(=date(vBenchmarkDate))"}>} CURRENT_PURCHASE_PRICE))