13 Replies Latest reply: Oct 23, 2014 7:16 PM by Gordon Cochrum

# Allocated memory exceed in chart

Hi everyone!

I am begginer in QV and have some, maybe, simple question. I tryed to build chart with calculate dimention (change the x-axis depending on selection in list box - Date, Week, Month and Year), but when I put expression like sum(Payments) i get "Allocated memory exceed" (when I put sum(1) it works well).

Could you suggest me something to avoid it?

• ###### Re: Allocated memory exceed in chart

Thanks,
AS

• ###### Re: Allocated memory exceed in chart

I used two variables for calculate dimension:

1. Period_chart2=if( GetFieldSelections(Period)='Date',1, if(GetFieldSelections(Period)='Week',2,if(GetFieldSelections(Period)='Month',3,4)))  // the number of selection

2.Period_chart=pick(\$(Period_chart2), [Date], [Year_Week] ,[Year_Month], [Year]) //select dimension according to number

and in calculate dimension I write =\$(Period_chart)

Thanks

• ###### Re: Allocated memory exceed in chart

Try with this:

2.Period_chart=pick(\$(Period_chart2), Date, Year_Week,Year_Month, Year)

Thanks,

AS

• ###### Re: Allocated memory exceed in chart

Isn't work (message "Allocated..." remain). But for chart expression like =sum(1) it works perfectly. maybe, thare are problems with row data(

• ###### Re: Allocated memory exceed in chart

Instead of doing all such Calculation using Variables and Calculated Dimension you can use:

Cyclic or Drill-Down Approach.

Regards

Aviral Nag

• ###### Re: Allocated memory exceed in chart

Create Cyclic or Drill-Down Groups:

• ###### Re: Allocated memory exceed in chart

Thanks, but I have different variables for different dimensions (For Date is one variable, for Week another) - that's why I did not use it. And there are plenty of charts on worksheet. It Would be much easier to have a selection table.

• ###### Re: Allocated memory exceed in chart

hi

create some thing like below

create a inline table

KPI

1

2

3

4

5

];

then use the below expression as your values

PICK(Match(KPI, 1,2,3,4),'Date','Week','Month','year')

• ###### Re: Allocated memory exceed in chart

Maybe I did not understand you, but using MATCH we only replace one number (KPI) to another one (serial number), are not we? If I don't use the dimension ('Date','Week','Month','year') instead of (Date,Week,Month,year) it is performed (with incorrect one point on X-axis), but if I change to dimensions the message "Allocated.. " appears again

• ###### Re: Re: Allocated memory exceed in chart

hi

pick(match(KPI,1,2,3,4),'Date','Week','Month','year')

here match function returns the number and pick function picks the corresponding value

plese find the below attachment ,

let me know if not clear on the same

• ###### Re: Re: Allocated memory exceed in chart

pick(match(GetFieldSelections(Period),'Date','Week','Month','Year'), Date, Year_Week,Year_Month, Year)

anything has changed - error appeared again

• ###### Re: Allocated memory exceed in chart

Hi Inna,

I think you calculate dimension is not correct.

Hope this will work for you.

-- Regards,

Vishal Waghole

• ###### Re: Allocated memory exceed in chart

I had the same issue when I tried to build a calculated dimensions which worked sometimes and didn't others.

Then I used an explicit dimension and enabled the condition and put in my show calc that way.

However you'd likely have to know your expected dimensions to use this method.

example of my 'enable conditional' on a dimension.

Match(vPickCal,1,4)

where vPickCal is a variable  1 was Year and 4 was Quarter.

in other words

if I picked a Year then the Year dimension shows up in the Pivot

and

if I picked Quarter then Quarter dimension shows up in the pivot.

I assume it is working because of

Include and Don't Show (working) vs Figure out what to Include (not always working--memory out)

Year and Quarter are explicitly in the Pivot already and then are being 'not shown' based on condition.

The other way it was having to figure out whether to be included...and sometimes was running out of juice on its way.

--brooks