How to arrive overall percentage of contribution for selected error codes

Hi All,

I have a calculated field “% error contribution” arrived using percentoftotal function, my requirement is to show top10 error codes and their % error contribution but while trying this in visualization % error contribution is getting calculate among these 10 error codes, whereas my requirement is to show these 10 error code’s contribution among overall error codes. how to over come this

Can you make the percent of total a prefilter aggregation?

percentOfTotal
(
     sum(sumOver(({measure}),[],PRE_FILTER))
)

Currently Iam using percentOfTotal(sum({attempts_in_error}),[week]) to get overall contribution.

I tried
percentOfTotal
(
sum(sumOver(({attempts_in_error}),[{week}],PRE_FILTER))
)
your suggestion , but i am getting wrong value, may i know where i am making mistake

Can you also partition by week on percent of total?

percentOfTotal
(
sum(sumOver(({attempts_in_error}),[{week}],PRE_FILTER)),[{week}]
)

If that doesn’t work I would start to play around with avg’s.

percentOfTotal
(
avg(sumOver(({attempts_in_error}),[{week}],PRE_FILTER)),[{week}]
)

Sorry Max, i tried both your suggestions, but still i am getting wrong output, for you better understanding i am attaching sample table as reference

Hi @sbaskax

When you run the percentOfTotal prefilter in quicksight what is the result you get versus what you are looking for?