Search code examples
olappentahomondrian

Can We show the string value as a measure on mondrian olap


I want to show the string value as one of the measure value. When a fact table has a integer value and string value respectively and also has some foreign table's keys. Then I could show the integer value as a measure value, but I couldn't show the string value as a measure. Because Measure element in schema of cube (written in XML) doesn't allow that a measure value doesn't have 'aggregator'(It specify the aggregate function of measure values). Of course I understood that we can't aggregate some string values. But I want to show the string value of the latest level in hierarchy.

I read following article. A figure (around middle of this page) shows a cube that contains string value as a measure value. But this is an example of Property value of Dimension table, so this string value isn't contain in fact table. I want to show the string value that contains in fact table.

A Simple Date Dimension for Mondrian Cubes

Anyone have some idea that can be shown the string value as a measure value? Or I have to edit Mondrian's source code?


Solution

  • I have had the same problem and solved it by setting the aggregator attribute in the measure tag to max. e.g.

    \<Measure name="Comment" datatype="String" column="comment" caption="Comment" aggregator="max"/\>