If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Data Format using Patterns

Started by Ravisha, 23 May 2019 10:11:47 PM

Previous topic - Next topic

Ravisha

Hi Cognoise,

I'm looking to see if there is a way to format the number 13203102 to 13.2M using data format patterns.

I tried the pattern ######M and set the scale to -6 which resolves to 13M but I need 1 decimal place. I tried the option set decimal place to 1 and changed the scale to -5 which then resolves to 132M (without decimal place).

Please help...

Thanks

ccb00mer

Set the Scale to -6, Number of Decimal places to 1 and add text object of 'M' after the number, or convert the 13.2 to a text field and add an 'M' to this text field.

Desbop

You were on the right track. You can do it with a pattern, and a scale of -6.

The pattern syntax needs a decimal. For what you're trying it would be: ######.#M

You haven't mentioned it, but for people stumbling across this in the future trying to format currency... You can hardcode a currency symbol in the pattern, or if you wanted to include a dynamic currency symbol based on locale, you can use the currency sign (alt + 0164 to type it): ยค######.#M

You can read more about the options here: https://www.ibm.com/support/knowledgecenter/SSEP7J_11.1.0/com.ibm.swg.ba.cognos.ug_fm.doc/c_decimal_frmt.html#decimal_frmt