Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Highlighted
Partner
Partner

Out of Calculation Memory Error

I have a small straight table in Qlik Sense (~8,000 records) and when I try to include the following variable it throws the memory error:

IF(GetSelectedCount(FromBillingMonthNameAbbr)=0,
Sum({<TransactionDate={">=$(=$(vDateFrom)) <=$(=$(vDateTo))"}, FEFTCount={1}>} Gallons),
Sum({<BillingPeriodVal={">=$(=$(vDateBillingFrom)) <=$(=$(vDateBillingTo))"}, FEFTCount={1}>} Gallons))

This is to limit the number of records shown by a couple of filters.  What is strange is that if I just add a Sum(Gallons) measure to the table it works fine but returns 100 times more records.  I have tried the above in a variable and also in a master measure.  

Labels (3)
7 Replies
Partner
Partner

Re: Out of Calculation Memory Error

Quick question. Why do you have 2 $ declarations in each variable
try with just this format
$(=vDateFrom)
Partner
Partner

Re: Out of Calculation Memory Error

This was how I was told to do it from a consultant and when I remove the extra =$ and change it to the below it breaks:

IF(GetSelectedCount(FromBillingMonthNameAbbr)=0,
Sum({<TransactionDate={">=$(vDateFrom) <=$(vDateTo)"}, FEFTCount={1}>} Gallons),
Sum({<BillingPeriodVal={">=$(vDateBillingFrom) <=$(vDateBillingTo)"}, FEFTCount={1}>} Gallons))

 

Also, when I use this in a KPI object it works fine.

michelle835
New Contributor

Re: Out of Calculation Memory Error

Can you tell a little bit more about the data model. I guess there are many overlapping fields (fields with same name in both tables) leading into a big synthetic key. Tables should be linked by one field only. So you need to create a composite key to link the tables.

Partner
Partner

Re: Out of Calculation Memory Error

Actually there are no synthetic keys.  

Partner
Partner

Re: Out of Calculation Memory Error

The data model consists of two main QVDs (1 has a record for each fuel transaction and 1 has detail fields for the fuel exceptions) that are joined on a single field called FuelSourceId.  This first contains 33.5 millions rows and the second has just under 700K.  These are not large QVDs and the app itself is only around 330Mb. 

I tried inserting the set analysis directly into the table instead of using a variable and it is working.  It's *really* slow but it works.

Just to add a bit more detail I have a dashboard that tracks 5 different fuel exceptions and there are 5 table objects that display the transaction details for each exception type.  I am using set analysis here so the table only contains records for that exception type and for the specified date range.  

EnriqueRLancha
New Contributor

Re: Out of Calculation Memory Error

Hi Bbergstom,

It's only an idea, but in my case, when Qlik give thar error was for use a Date Dimension diferent that the formula uses in set analisys.

 

Regards.

 

 

Partner
Partner

Re: Out of Calculation Memory Error

Thanks for the reply!  We ended up going a different route with the visuals but I'll keep this in mind.