KPI with Dynamic Title ie. Month

Hi Team,
As a requirement We need to have dynamic title for example its March this Month but I need to write Sales Previous Month i.e Sales in Feb… Feb should be dynamic where when we enter to next month Previous Month will be March hence my title should Autochange to Sales in March in KPI title.

As in Problem We are Unable to save Previous Monthname in Parameter


Hi @shweta,
As you already highlighted and generally speaking, dynamic titles can be achieved within QuickSight using parameters. Depending on your use case, you can set the dynamic value for the parameter either via the URL, via controls, via custom actions, or via the setParameters action of the JS embed SDK (if you embed your dashboard into a web application).

If you have the possibility to set the parameter via any of the above mentioned options to the desired value, I’d highly recommend to follow that approach.

If that is not possible for you and you want the desired value to be calculated by QuickSight, you can implement the following workaround leveraging the free-form layout, a dummy dataset, and an extra table that displays your dynamic title:

  1. Ensure in the Settings on the left that the Sheet Layout is set to Free-form.
  2. Create a new parameter that defaults to the first day of the previous month:
  3. Create a dummy dataset (recommended to have it in SPICE) which only contains a single field and value (you can freely choose the data source, e.g., uploading a minimalistic CSV file).
  4. Add a calculated field, which will contain the desired title, to the newly created dataset using the following formula:
concat("Sales in ",formatDate(${pPreviousMonth}, 'MMM'))
  1. Add a new visual of type Table to the sheet that is linked to the dummy dataset and select the calculated field as the only field to be shown in the table. This should create a table with a single cell that contains your dynamic title.
  2. Open the formatting options of the table and remove titles, headers, cell lines, all style options, and interactivity, as well as setting the background color of the cell to the background color of your KPI visual.
  3. Open the formatting options of the KPI visual and remove the title OR replace the title of the visual with a space to make it disappear, but keeping the original spacing within the visual).
  4. Move the Table visual on top of the KPI visual to get the dynamic title at the right place of your KPI visual.

The result of it should then look like this:

I hope my solution worked for you. Let us know if this is resolved. And if it is, please help the community by marking his answer as a “Solution”.

1 Like

Hi @shweta

Did above provided solution work for you? I am marking the reply as “Solution,” but let us know if this is not resolved.

Thanks for posting your questions on the QuickSight CommunityQ&A Forum!

1 Like