1

I am writing a connector for Google Data Studio. I noticed that if I specify in semantics in datashema percent:

semantics: {
    conceptType: 'METRIC',
    semanticType: 'PERCENT'
}

Then Google Data Studio multiplies the original value by 100. Instead of 2.15%, I get 215%. Can I change this somehow?

And one more question. By default, Google Data Studio for fractional numbers leaves only two decimal places (3.14). I want more (3.1415926). Where can I change this?

1 Answer 1

0

For your first question, Data Studio expects the value for a percent to be a decimal value where 1.0 === 100%. Connectors that return a PERCENT should divide the value by 100 if they are returning 2.15% as the value 2.15 . This can also be accomplished through a formula, though the first suggestion would be preferred if you are the connector author.

For your second question, this can be achieved through the "style" tab for a visualization. You might have to scroll, but you should see the option "Decimal Precision" which defaults to "auto". It can be changed to any value from 0 to 8.

enter image description here

And as a bonus tip, instead of manually defining your schema as JSON, it's suggested to use the Data Studio Apps Script Service.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.