Hi, I’m trying to create a KPI visual. Instead of comparing, for example, December 2023 revenue with November 2023 revenue, I need to compare December 2023 revenue with December 2022 revenue. How can I do that?
Hi Erik. Thanks for your help but I’m stacked at point 12: what should I do if my “Sales” is a pre aggregated function? For example imagine that in the function below I would have sum(Sales) instead, and the function wouldn’t work - what can I do instead to make the below work?:
ifelse(${PeriodStarting}=‘Day’,periodToDateSum(sum(Sales), {Adjusted Order Date}, ‘DAY’, now()),
${PeriodStarting}=‘Month’,periodToDateSum((sum(Sales) , {Adjusted Order Date}, ‘MONTH’, now()),
${PeriodStarting}=‘Quarter’,periodToDateSum((sum(Sales) , {Adjusted Order Date}, ‘QUARTER’, now()),
periodToDateSum((sum(Sales) , {Adjusted Order Date}, ‘YEAR’, now()))
Hi @P_G ,
Here’s a sample dashboard that shows how you can compare period to date measures across years.
You can click the copy analysis icon on this page to create a copy of the underlying analysis and explore the solution therein.
I have used 15-Nov-2023 as current date in this sample as this is going against a static dataset. In real life scenario, you will use now() to get the current date.
Q23696 Solution
More on Arena - QuickSight Arena -- An embedded instance of QuickSight within the QuickSight Community
Regards,
Arun Santhosh
Pr QuickSight SA
Hi Arun, thank you so much for your suggestion!