Solved

# Percentage of each item based on total

• 7 replies
• 215 views

• New Participant
• 3 replies
`Guys, how are you? I'm trying to create a column that shows the percentage of each item's quantity based on the total sum of quantity. I'm not getting success... if I put the percentage directly in the insight, I can't add another column with integer values. Is there any metric that brings me these values?Attempt to create a metric...SELECT (SELECT SUM(Quantidade) BYÂ Tenant, ALL OTHER WITHOUT PF) / (SELECT SUM(Quantidade))`
`Trying through Analyze- This is the desired column`

Â

Â

- But when adding the quantity column in integer format, it disables the "show in %" option

Â

icon

Best answer by Joseph Heun 28 November 2022, 18:17

View original

### 7 replies

Userlevel 3

Hello Douglas,Â

This is set up by design. The format for percent is allowed to use this, whereas Decimal is not. I can submit this as product feedback on your behalf if you would like?

Â

Yes I do, thanks for the help @Joseph HeunÂ =)
Is there another way to get around this problem?

Userlevel 3

You should be able to open the metric in metric editor and then set the custom number formatting from there. Can you please confirm which product you are using?

`I believe I'm usingÂ Gooddata Growth. `
`You told me to change the formatting to be different from decimal, right? But I have to add another column that will calculate the percentage of values â€‹â€‹like \$0.00, in this case it needs to be decimal...`

Â

Userlevel 3

I meant in the metric editor, using the format editor. This isnâ€™t in the reporting/insights tab, but rather in the metric editor:Â

Â

You can try and create something where you play with the formatting here to get what you are looking for, but it may not make the most sense if you are working with a simple sum function.

@Douglas Paiva, did you ever manage to achieve what you were hoping to.Â  Iâ€™ve got the same question, and am confused by the suggested workaround.Â  I would have thought this was a pretty common requirement so am I missing something.

Just to recap, I want to show in a single Insight, An Attribute, itâ€™s Sum, and the % of the total.

Thanks.

Userlevel 3

Hi Mark,Â

What issues are you having specifically? Once you have your calculation you need to adjust the number formatting from the pic above so that it looks like the following:Â

Â

#,##%