Number format perspective percent

trying #0.00’%’ in a table from a query that used Select *
getting 350.00000% instead of 3.5%

It is multiplying by 100 even though I am using the quotes.
Is this because I am writing it wrong or 8.1.0 doesn’t do this?

edit
I think I can go to the query, and format the columns there.

3.5 is 3.5 per unit = 350 per hundred = 350%.
If you want to display percent and your SQL is in units then you’ll need the SQL query to divide by 100.

It’s generally bad practice to use SELECT * because stuff breaks if you add or delete fields from the database. Use SELECT <field1>, <field2>, etc. in your queries to avoid problems. In your case you’ll be doing
SELECT <field1>, prodCount / 100 AS Count, etc.
or similar. Then you can format.

You can check my first statement in Excel. Type 3.5 into a cell and then format it as %. What’s the result?

image

I was trying to follow the example on

https://docs.inductiveautomation.com/display/DOC81/Data+Type+Formatting+Reference

I think my 8.1.0 version strikes out again though

I normally use format(Counts.OEE,'P") in the query

Ah, right. I hadn’t seen that before.
You might add a Vision or Perspective tag to your original question in case it makes a difference.

1 Like

What is the actual literal value in your output, and exactly how are you configuring your transform/formatting?

1 Like

I think it is 8.1.0 issue

image

image

it is in a table from a query, and I think I need to edit the query with format( ,‘P’)

V8.1.0 has many bugs… You should definitely upgrade

1 Like

I need to document how I resolved this.

Same issue today.
format( ,‘P’) in the query, has 0.##% in the column

I submitted request to upgrade ignition version haha thanks for reminder