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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

IF statement changed to set analysis

Hi guys,

I have an expression which takes ages to calculate and 9 times out of 10 even times out "Calculation timed out"...

The expression is this

sum({<pricing_invoice_dated_year={$(vyear1)}>} if(pricing_invoice_CustNo = pricing_CustNo,pricing_invoice_val))

Can this be changed to set analysis somehow to speed this up?

Thanks

18 Replies
Anonymous
Not applicable
Author

The problem is I can't do it in the load script because the fields pricing_invoice_CustNo and pricing_CustNo are from different tables.


Unless I am wrong here and you can do it?

sunny_talwar

It can be done, but again you run into the issue of creating a Cartesian Product between two tables. You can explore the option of using Mapping Load where you bring only one field from one table into the other without worrying about the Cartesian product

Anonymous
Not applicable
Author

I am getting a syntax issue on this expression as well?

Capture.PNG

Kushal_Chawda

Mel_Mesaoud   have you tried what i had suggested?

Anonymous
Not applicable
Author

Hi Kush,

I did try it but the value is zero

Capture.PNG

ogster1974
Partner - Master II
Partner - Master II

Try

sum({<pricing_invoice_dated_year={$(vyear1)}, pricing_invoice_CustNo=p(pricing_CustNo)>} pricing_invoice_val)

I use this approach when wiring my master calendar up to various dates within my model.  It seems to work for me although your use case may be different.

  

Perhaps need to AGGR your data aswell to bring back what you want.

AGGR(SUM({<pricing_invoice_dated_year={$(vyear1)}, pricing_invoice_CustNo=p(pricing_CustNo)>} pricing_invoice_val) pricing_invoice_CustNo)

sasiparupudi1
Master III
Master III

do you get the results quickly if you just did sum({<pricing_invoice_dated_year={$(vyear1)}>}

sasiparupudi1
Master III
Master III

Hi

Have you managed to solve your problem?

Sasi

qlikviewwizard
Master II
Master II

HI Mel_Mesaoud

Can you attach the sample file to demonstrate your issue? Thank you.