I’ve two different tabs in my dashboard: one for Monthly data and another for Quarterly data. Both the tabs have KPI cards as shown below. Currently the KPIs are showing MoM/QoQ comparison but i want to implement YoY comparison (i.e. Jan-2024 vs Jan-2023
and Q4-2023 vs Q4-2022
) in both the tabs. Based on the selected Reporting Date, it should compare the most recent month/quarter with the same month/quarter in the previous year.
I checked below links but it didn’t help.
Old Post link: How to customize the KPI cards
1 Like
Hi @Deep @Naveed @DylanM @Ying_Wang - can you please look into this and provide inputs?
1 Like
Do you mind to try this: Period over period computation - Amazon QuickSight
If it doesn’t work, feel free to ping @emilyzhu to schedule a discussion, or, contact your account manager to raise a feature request.
Hello @chabbils, were you able to have any luck with the Period over Period calculations recommended by @Ying_Wang? If not, maybe you could do something where you set a specific date value that links to a parameter. Then you can use an ifelse function with extract and truncDate functions to find the values that match over multiple years. It would require a 2nd parameter controlled filter as well that the user could set to either Month or Quarter as the comparison datetime value. I’ll write some examples below:
Comparison Dates =
ifelse(
${DateComparisonMethod} = 'Quarter' AND extract('Q', {Date}) = extract('Q', ${DateParam}) AND (
extract('YYYY', {Date}) = extract('YYYY', ${DateParam}) OR extract('YYYY', {Date}) = (extract('YYYY', ${DateParam}) - 1)), truncDate('Q', {Date}), NULL
)
This is half of the function required, as you would also have to check for the Month level selection, but this should help get you to your desired result. You could return only the dates expected, then apply a generic datetime filter on your visuals from the Comparison Dates calculation that would account for the full time scale of your data and ensure nulls are excluded from return values. I’ll show how I made the filter below.
I will mark this as the solution, but please let me know if you have further questions. Thank you!
I had a call with @emilyzhu today based on @Ying_Wang’s response. She told me that doing an YoY comparison within a KPI card is outside of its capabilities as of now. So, I will raise a feature request to QS team so that they can try to implement this feature in near future.
1 Like
Hello @chabbils, thank you for letting me know! I will tag this topic as a feature request and archive it for our support team.