Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Allocated memory exceeded error

Hello everyone,

I've got this annoying "Allocated memory exceeded" error while trying to dinamically add dimensions to pivot table.

When I'm adding them via GUI I get no errors at all.

Macro I'm using:

sub onSelectMacro

  set chart = ActiveDocument.GetSheetObject("CH01")

  ' clean chart dimensions

  set dims = chart.GetProperties.Dimensions

  for i=0 to dims.Count - 1

    chart.RemoveDimension 0


  'add dimensions

  chart.AddDimension "time_name"

  set dimSelection = ActiveDocument.fields("dimension").GetSelectedValues

  for i=0 to dimSelection.Count - 1

    chart.AddDimension dimSelection.Item(i).text  


end sub

I'm attaching sample file.

Please help me sort out this strange behaviour.

Tags (2)
3 Replies
Not applicable

Re: Allocated memory exceeded error


you can use Calculated Dimension and put the expression:

IF(GetFieldSelections(dimension) = 'name_name', name_name, rx_name)

Not applicable

Re: Allocated memory exceeded error

Thanks for your response!

I beleve your approach is usefull when there are only few dimensions. And unfortunately I've got at least dozen of them.

As a matter of fact. I've found that when I add these three lines to my macro it suddenly starts to work:

  set props = chart.GetProperties

  props.tableProperties.NumberOfLeftDimensions = dimSelection.Count


This approach do not affect web client, which is pity. I suspect it's a bug.

Not applicable

Re: Allocated memory exceeded error

Hi, victor,

I've had the same problem. It works well with the code that you gaveSmiley Happy You save me a lot of time!

We can report this bug so that it could be fixed in the next release


Community Browser