I have an analysis that uses Reporting Period as a control over a parameter named “Granularity” which contains specific values - MONTH, QUARTER, YEAR, YTD, CUSTOM_RANGE.

I created two additional parameters StartDt and EndDt and added two controls Start Date and End Date for them respectively.

How I want it to work is

  1. If the user selects MONTH as Reporting Period, show monthly data (filtered to the specific date range selected by the user via Start Date and End Date controls)
  2. If the user selects QUARTER, show quarterly data filtered to the date range
  3. and so on. This seems to be working fine. This is handled by an if else logic


I need to add the below logic and am a little confused about how to.

  1. If the user wants to see data for a CUSTOM date range (chosen via the date picker Start Date and End Date) they select CUSTOM_RANGE as the reporting period and the data should be aggregated at this level and display in a single column.
  2. If the user wants to see YTD data, when they select YTD as the reporting period, based on the start date and end date selected, YTD data should show. For example, if start_date = May 1 2022 and end is March 20 2023, there should be two values for YTD sales for example
    May 1 2022 thru Dec 31 2022 Jan 1 2023 thru March 20 2023

Is this achievable? Thanks a ton! Happy to provide any more information if needed.

hi @Madura_Puri I think this thing we can’t achieve in QuickSight I am trying this in my end but failed to get the desired result.


Thanks & Regards
Biswajit Dash

Hi @Madura_Puri
The workaround for this requirement is to create a custom view or a custom table with the structure similar to the below:
The table would have 2 columns considering you have time & one metric.
Screenshot 2023-03-24 at 2.09.41 PM

You can additional timeslices based on the need and use this in the analysis and filters. The view will be a simple union of the different time level aggregations.