Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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.

1 Reply
swuehl
MVP
MVP

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))