pentahomondrianpentaho-spoon

Pentaho - Formatting date in Mondrian


I am getting date like 20150910 numeric from backend. I am creating new level in Dimension (in Mondrian-template)

Is there any way to format the date to 2015-09-10 ?

Can i achieve this using formatString ?

Any pointers will be highly appreciated .

Thanks


Solution

  • You can use a KeyExpression, which accepts SQL statements, then split the string in the various parts and concatenate it back with dashes in between.

    See https://mondrian.pentaho.com/documentation/schema.php#XML_KeyExpression

    Remark: if you use a KeyExpression you should not use a column attribute.