Is there a possibility to make calculation within pivot table?

I am currently trying to make pivot table that is combined of some columns, rows and 3 values.
…,…,…,…,…,… Column1
Row1 Subrow1 [val1],[val2],[val3 = val1/val2]%
…,… Subrow2 [val1],[val2],[val3 = val1/val2]%
Row1 Subrow1 [val1],[val2],[val3 = val1/val2]%

Those val1 and val2 are count distincts and this val3 has to be division of them
example
…,…,…,…,… Column1
Row1 Subrow1 1,2,50%
…,… Subrow2 3,9,33%
Row1 Subrow1 21,37,57%

Is it passible in Quicksight?
Please, I would appreciate any help.
Many thanks,
Konrad.

@KonradAntczak … Hi Konrad.

You can use 2 calculated fields for calculate the two distinct fields in two columns of pivot table and then calculate the % among them, as other calculated field in the third column.

image

image

image

And you can see at right side two images or pivot tables , one grouped by dimension COUNTRY and PRODUCT_ID, and the other only grouped by COUNTRY, and %1 is correctly calculated in both.

Regards, José Burrull

Senior Data Engineer
ITVIS SPA. Santiago de Chile. 27.12.2023

1 Like