Search code examples
amazon-quicksight

How to do a period over period comparison in Amazon QuickSight?


I want to compare data from the current period (e.g current month) with the previous period (e.g. last month).

Let's say I have the following dataset:

date orders
2020-01-01 1
2020-01-02 2
2020-01-03 5
2020-02-01 4
2020-02-02 2

And I want to get:

Jan 2020 Orders Feb 2020 Orders Delta Orders
8 6 -25%

Period can be selected by user.


Solution

  • the way I reached your desired outcome is by creating a calculated filed "MoM Change":

    percentDifference(sum({ orders}), [date ASC], -1, [])
    

    enter image description here

    Also, this tutorial might be helpful: https://learnquicksight.workshop.aws/en/business-level-up.html