Friday, March 9, 2012

Hardcode subtotal

Hello,

Can I hardcode matrix subtotal?

For instance, I want to hardcode "100%" in the following Sales report:

2007 Year

Quantity

Phones 21%

Notebooks 30%

Total 100%

Please don't ask me why I need to do that, it's a complex MDX query and the report is much more complex than I depicted.

I just need to statically write 100% in subtotal.

Write the following expression

Code Snippet

=100 & "%"

in the text box where u want to display 100%.

Best Regards,

Rajiv

|||

RajivDotNet wrote:

Write the following expression

Code Snippet

=100 & "%"

in the text box where u want to display 100%.

Best Regards,

Rajiv

I would just like to mention the InScope function. If you have a calculation in that column to determine the percentage, you can just add an IIf and InScope function to the expression to determine whether you are within the bounds of your row group, if you are within bounds then do your normal percentage calculation, if you are out of bounds then just return "100" (and use the code p0 in the Format property so that things are formatted correctly when exported to Excel).

|||

Dear Rajiv and Sluggy,

Thank you very much for your quick response.

Your approach worked!

No comments:

Post a Comment