KPI's Year to date

Hi Team,

Can someone help me on the below. I want the period to be month-to-date, which means the comparison will be on the previous month’s date.

For example, in the below example we want to see the comparison for the month of April 2023 and June 2023

we have created a parameter as period and I have written the below formula.

ifelse(${Period}=“Month”,truncDate(“MM”,{batch_date}),${Period}=“Year”,truncDate(“YYYY”,{batch_date}),${Period}=“Quarter”,truncDate(“Q”,{batch_date}),${Period}=“Week”,truncDate(“WK”,{batch_date}),NULL)

Hi @tdr_Dinesh ,

Please take a look at the post here. This gives several examples of how to use period to date functions with KPIs. Also there are a couple of links in that posting that are worth taking a look at as well.

Hope that helps.

ws

Hi @tdr_Dinesh ,

Did guidance provided by @wstevens01 unblock you? If so, please mark it as solution.
If you are still have trouble, please create a sample analysis in Arena show casing your problem and post the link here with details on what your are trying to achieve.

Details on using Arena can be found here - QuickSight Arena -- An embedded instance of QuickSight within the QuickSight Community

Regards,
Arun Santhosh
Pr QuickSight SA

Hi @ArunSanthosh ,

Guidance provided by @wstevens01 helps a lot, but unfortunately I am experiencing an issue. I have created sample analysis in Arena. I have selected date as November 01, 2023, to January 2024 but the comparison shows data for December 2023 to January 2024 instead.

testfile

Hi @tdr_Dinesh ,

Thanks for loading this up in Arena! I added a new table visual and adjusted the filter to show whats happening. The montly aggregation that you’ve set on the KPI trend group tells the KPI to show this month and last month, independent of the filter. When you look at the table, you can see that the months that are displayed match what is in the filter.

If you want to compare something besides the last month (as with the KPI), then you’ll need to put it in the table and create a calculated field.

Hope that helps.

ws

Hi @wstevens01 ,

Thank you! Could you please share the link where you added the new table visual?

Oops! Sorry. Here it is.

Along with a screen shot:

ws