Report Portal

Q: How in MDX can I override formating for all calculated measures in one measure group?

Q: How in MDX can I override formating for all calculated measures in one measure group?

 

A: There are few different functions you will have to use to achieve that. First of all MDX has function Format_string that you can use to assign formating to measures. Here is sample usage of this function:

Format_string([Measures].[Amount]) = "#,##0.00";

A bit bigger problem is to identify calculated measurs. In MDX there is no easy way to identify if measures are real or calculated. But you can use trick: you can take all measures from one measure, then add calculated measures and then remove all real measures.

Final code that will override formating for all calculated measures in one measure group will be:

Format_string(AddCalculatedMembers(MeasureGroupMeasures('Internet Sales')) - MeasureGroupMeasures('Internet Sales')) = "#,###.###";

Done.

Tags: mdx, faq, format

 

2007-2015 VidasSoft Systems Inc.