Posted by: edsyrett | 24 November 2008

OLAP and Cubes

And for my next trick, it’s OLAP Cubes in Flex…

When I started researching for this prototype, I couldn’t find much about programmatically setting up the cube dimensions in ActionScript – the documentation seems to advise that we should do it in MXML.  But thats really limiting, because it means that you can’t dynamically alter the cube and the query.

However, after digging around it seems it’s not that bad at all, and after a few hours work, here’s my OLAP test app.

The app takes an XML data source which contains the data and the schema, i.e. a list of the fields in each row.  I then populate a bunch of combos so that you can dynamically select each axis.  In the example, the data is really simple with only four axis values and one measure value.

The combos force you to select at least one row and column axis, then you can click on Refresh to populate the grid.  If you want to change anything, click on Reset to clear the grid and all the combos.

I’m still working on it, and on the list of things to do, there are the following items:

  • Make the combos and the related axis colour coded, so that you can easily see which axis came from which combo.
  • Plug the data from the cube into a chart.  Whilst this is theoretically possible, I suspect it’s going to be really fiddly…




  1. Hello, My name is Raphael Vincius and I precisnado create some indicators web, and is much like that you showed in your article.

    I would use as its code base, because I am learning to use the Flex.

    There is the possibility that you provide the source code?

    Now, thank you.

    [] s

    • Hi Raphael,

      You should be able to load up the OLAP application, right-click on it, and select “view source” on the popup menu. You can either look at the source directly or download a zip file containing the source.

      Best of luck.


  2. I tried the code, but he gives the following error:
    Error # 2032

    Went searching for what appears to be an error to access a URL or file, but put the code exactly as it came.

    Any suggestions?

    [] s

  3. Could run!

    The problem was that the code was declardo address “data.xml”, but in fact the project was placed in the file folder date. The right to be “.. / data / data.xml”.

    It was very good, congratulations!
    Now you need to have the same values are shown in a graphic, so the User can choose between a table and graph.

    [] s

  4. […] originally had a go with the SDK OLAP classes.  One of my previous posts here shows a test app that I produced.  This app shows just a grid with the cube output. […]

  5. You just saved my sanity, thanks a lot!

  6. olapdatagrid is not flexible, after executing cuberesults how to extract results? you can only display the results on a olapgrid, no way to export to flatfile etc.. ;(

  7. im looking at findDimension hopefully i can get all cuberesults

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: