Hi there,
how can I compare two or more columns which each other and create a field which shows the difference of the value of these two columns?
Example:
You have several scenarios with costs forecasts. In Quicksight you want to compare the costs on yearly basis of these scenarios.
Has someone an idea how to solve this?

Thank you very much
Hi @de.schmidd ,
There are a couple ways to do this:
- Create a calculated field and use the periodOverPeriod functions. For instance you can create a ‘sales difference’ as follows:
periodOverPeriodDifference(sum({Sales}), {TransactionDate}, MONTH, 1)
There’s a handful of these functions for different scenarios, like periodOverPeriodSum(), periodOverPeriodAvg(), etc
- You can add a table calculation to a pivot table from any of the Values:

And notice that you have the option on how it’s calculated with the ‘Calculate As’ option.
Hope that helps!
ws
1 Like