Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Allocated Memory Exceeded - Conditional Statement Issue?

Hello,

I'm trying to get a Pie chart to show the data of incidents that were opened in the last 28 days, and are ranked level 1 and level 2. I have created a variable that measures the last 28 days. Below is my code for my expression, is this the reason I'm getting the error message?

Sum(
{<
[Incident Severity Code]={'1','2'},
[Incident Open Date]={'>=$(v28DaysBack)'}
>}
[Incident Counter])

Incident Counter is the number of all incidents, severity code is what level (so I only want level 1's and 2's) and the open date is when they were logged as open.

Speaking to the service manager the memory utilisation is at 60% so nothing to worry about on that front.

Thanks for the help,

Michael

8 Replies
vishsaggi
Champion III
Champion III

What is your expression in that variable can you post it please ?

May be you can try:

Sum( {< [Incident Severity Code]={'1','2'}, [Incident Open Date] =  {"$(= '>=' & Date([Incident Open Date], 'MM/DD/YYYY') -28) & '<=' & Date([Incident Open Date], 'MM/DD/YYYY'))" }  >} [Incident Counter])

Not applicable
Author

Hi Vish,

Below is the variable:

v28DaysBack: Date(Today()-28,'dd-MMM-YYYY')

I'll try what you've suggested anyway and it came up with "No data to display".

Thanks,
Michael

vishsaggi
Champion III
Champion III

Can you change your variable to this and try ?

IS your [Incident Open Date] has the same format as your variable date?

Sum(
{<
[Incident Severity Code]={'1','2'},
[Incident Open Date]={" $(= '>=' & '$(v28DaysBack)' & '<=' Date(Today(), 'dd-MMM-YYYY') )" }
>}
[Incident Counter])

Colin-Albert

The first thing I would check is the data model.

Do the fields you are using exist in separate tables that are not associated in the data model? If so then a Cartesian join is created in memory hence the out-of-memory error.

See this post for more details  Re: Why do unlinked tables consume excessive memory?

Not applicable
Author

They are in the same table from the same source, so I don't think that would be the issue.

Not applicable
Author

What did you need me to change my variable to? Or should I just change the expression to what you've listed as above?

Michael

vishsaggi
Champion III
Champion III

Sorry I mean can you try the below expression and see if you getting any values.

I presume the IncidentOpenDate is in the same date format 'dd-MMM-YYYY'.

Sum(
{<
[Incident Severity Code]={'1','2'},
[Incident Open Date]={" $(= '>=' & '$(v28DaysBack)' & '<=' Date(Today(), 'dd-MMM-YYYY') )" }
>}
[Incident Counter])

jonathandienst
Partner - Champion III
Partner - Champion III

First, define the variable slightly differently - add a leading = sign:

     Set v28DaysBack = =Date(Today()-28,'dd-MMM-YYYY');

     (not a typo, you could also add the = sign in the variable overview)

Then use the expression:

=Sum(

  {<

     [Incident Severity Code]={'1','2'},

     [Incident Open Date]={">=$(=v28DaysBack)"}

  >}

[Incident Counter])

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein