Calculate percent of total by row

Hello team!
I have a data source that has data by marketplace (country), and I am trying to get the representativity % of a field (value) based on the group row, not the column. So for instance, I have marketplaces 4 and 5. Instead of getting a percent of total for them that would sum 100% altgother, I need that within marketplace 4, I have a SUM of 100% and within marketplace , a sum of another 100%, meaning that I need the percent of total to be based on whatever I put as a row (markeplace, item name, etc).

help

In the picture above, I should have for every marketplace row, the sum of 100% (that would comprise the sum of YES and NO together). Right now you can see that row marketplace 4(first line) is giving 71.11%, out of the whole total (all marketplaces)

Right now the calculate field formula is as below:

Net Concessions coverage % =
percentOfTotal
(sum({net_concessions}))

Could you please help on that?

thanks

I think you just need to partition by marketplace_id.

percentOfTotal
(sum({net_concessions}),[marketplace_id])
1 Like

Hey Max, thanks for getting back so fast!
This indeed fixes part of the issue, but as far as i understand it would only work for visuals that marketplace_id is used.

What I was trying to get is a formula that would allow me to filter or sort as I wish, and it would calculate the percent of total for the ROW accordingly. Example: I remove Marketplace and include another field called “Brand”, and I now want the %percent of total to be based by brand.
Is it possible to do this or not?

Thank you again!!!

Hi @Yohan_Trindade

Can you try adding a table calculation?

You should be able to group it to your preferred way.

2 Likes

Hello
has this feature disappeared (old and new QuickSight look)?
Thank you.

I guess that this featured was deprecated, but there is some functions that did the same: