QuickSight action

I have an action setup in my QS dashBoard, which basically triggers user Clicks (click on X-Axis which has Month numbers) . I show in another QS Pivot Table this data for a specific month the user chooses (clicks). This work fine. However, What I’m look for is to compare it with previous month. Which requires the Data for the month the user selected (clicked) and also automatically the data of previous Month. How can we get these two months data (the one clicked and its previous) in QS?

You will need to make it a navigation action that changes a parameter.

So that click of the x-axis will alter the parameter to be that month.

Then I would make a calculated field that checks whether the month of the data is either the month of the paramater or the month before.

ifelse(truncDate({date_data},‘MM’)=truncDate(${date_param},‘MM’) OR truncDate(addDateTime(1, ‘MM’, {date_data}),‘MM’)=truncDate(${date_param},‘MM’),‘Use This’,‘Filter Out’)

Then set up your table to filter to this field when it’s only ‘Use This’

Let me know if that helps!