BAQ - format column as percent

Relatively new to BAQ and I’m not having any luck with formatting integers as percent.
I used the Display Field Attributes Editor and tried variations of the syntax. I landed on >>99, but it doesn’t show the percent sign. If I enter >>99%, it adds two zeros. So, 2% is 200%, and 32% is 3200% etc. I’m missing the correct syntax. Thank you in advance!

image

image

1 Like

Normally percentages are stored as a decimal/fraction, so 20% = .2, for example. If your values are stored as whole numbers, you will need to divide by 100.

If it were me, I would create a calculated field that references your Number02 field. Something like:

FORMAT(OrderHed.Number02 / 100, 'P')
1 Like

I tried your suggestion and got this error:
Severity: Error, Text: Input string was not in a correct format.Couldn’t store <65.00%> in Calculated_MARGIN Column. Expected type is Int32.

To use this solution, your calculated column will need to have a data type of ‘character’ instead of ‘integer’.

Almost there. It shows 65.00%. I do not need the decimal or trailing zeros.

1 Like

Try ‘P0’ instead of ‘P’ in the FORMAT function. P0 is ‘Percentage with 0 decimal places’

Bingo! It works perfectly. Thank you Andrew!

As a side note, I didn’t know that you could add % to the end and it would multiply by 100 and add the % sign. I needed this today, so that was a pleasant surprise.