Dynamic Text in QuickSight Insight Narratives Based on User Selection

Certainly! Below is a sample query you can post in the Amazon QuickSight community:


Subject: Need Help with Dynamic Dimension and Insight Narrative
Hello QuickSight community,

I’m working on a project where I need to dynamically switch between “Brand” and “Merchant” as the dynamic dimension based on user selection. I have a control (dropdown) with the options “Brand” and “Merchant.” The goal is to adjust the Top.categoryField.name in my formula based on this user selection.

Here’s a simplified version of what I’m trying to achieve:

Top 3 DynamicDimensions for total DynamicMeasure:

  1. HomeDepot.com with 20,220,593
  2. Lowes.com with 20,097,157
  3. BestBuy.com with 17,761,688

Formula for preview:

Top if Top.itemsCount > 1 then Top.categoryField.name for total Top.metricField.name if Top.itemsCount > 1 are: if Top.itemsCount < 2 is: for Top.items
Top.items[index].categoryValue.formattedValue with Top.items[index].metricValue.formattedValue

Challenge:
I want to dynamically change the dynamicDimension based on user selection and adjust the display of Top.categoryField.name accordingly. How can I achieve this in Amazon QuickSight? Any guidance or sample queries would be highly appreciated.

Thanks in advance!

Hi @Viji. Welcome to the QuickSight Community!

This question showed up in our article queue, so I am moving it to the Q&A forum section of the Community.

It looks like the question is a reply to an existing conversation? If so. could you re-post this so that it is connected to that thread?

cc: @duncan @DylanM – so you can keep an eye on this and make sure it gets to the right place/gets addressed. Thx!

Happy New Year!

1 Like

Hello @Viji !

Do you mean that you want to be able to switch the narrative in your insight based on two parameter selections? For example, someone could choose Home Depot (merchant) OR they could chose Whirpool (brand)?

Hey @Viji !

Are you still having trouble with this?

Hello @duncan,

I solved it. Thank you.

1 Like

Hello @Viji !

That’s great to hear, do you mind sharing your solution to help the community?

Hello @Viji !

I am going to mark your comment as the solution for now, but if you can could you share your solution to help the community?

Sure, Here’s the solution:

And here’s the output:

1 Like

Hey @Viji !

Thank you for sharing your solution with the community!

1 Like