Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
bbergstrom
Partner - Creator II
Partner - Creator II

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

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

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

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.

bbergstrom
Partner - Creator II
Partner - Creator II
Author

Actually there are no synthetic keys.  

bbergstrom
Partner - Creator II
Partner - Creator II
Author

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

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.

 

 

bbergstrom
Partner - Creator II
Partner - Creator II
Author

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