# Cell formatting

**URL:** <https://community.amazonquick.com/t/cell-formatting/48271>\
**Category:** Q&A\
**Tags:** dashboard-embed, developer, quick-sight\
**Created:** [July 17, 2025, 3:34am UTC](https://community.amazonquick.com/t/cell-formatting/48271 "2025-07-17T03:34:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ttientrung](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@ttientrung](https://community.amazonquick.com/u/ttientrung)\
**Post date:** [July 17, 2025, 3:34am UTC](https://community.amazonquick.com/t/cell-formatting/48271/1 "2025-07-17T03:34:06Z")

</div>

I’m working with a table visual that uses this calculated field:

```auto
"expression": "concat('[', title, '] \r\n', page)"

```

This concatenates the page **title** and its **URL** into a single cell (with a line break between them). When the title is very long, it wraps onto three (or more) lines and pushes the URL out of view.

I’d like to:

1. **Limit the title** to **two lines** of text.
2. If the title is longer, show its full text in a **tooltip** on hover.
3. Always reserve the **third line** for the URL, so it’s always visible.

Is there a way to enforce these formatting rules in the table visual?

---

<div class="post-metadata">

**Author:** ![andrepgn](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/andrepgn/32/25909_2.png) [@andrepgn](https://community.amazonquick.com/u/andrepgn)\
**Post date:** [July 17, 2025, 9:30am UTC](https://community.amazonquick.com/t/cell-formatting/48271/2 "2025-07-17T09:30:01Z")

</div>

Hi @ttientrung!

What about something like this:  
create a calculated field (assuming 100 is the max title length we need):

```auto
output_title = 

ifelse(
    strlen( {title} ) > 100, 
    left( {title}, 100 ),
    {title}
)

```

**EDIT** : even better solution using `substring`, as suggested by @ttientrung

And this should solve the issue of the two lines (just check the max length you need).

For the tooltip, on a Table Visual there no possibility to add a tooltip in this moment. On the visuals where it’s possible to create a tooltip, you should see it under “Interactions” menu.

You can try exploring the [HighCharts](https://docs.aws.amazon.com/quicksight/latest/user/highchart.html) capability, where with some code you can do more advanced stuff.

A workaround can be something like this:

- Create a new _Interactions \> Actions \> Add Action_
- In the _Action Name_ set something like `Full Title: <<Title>>` (`<<Title>>` means that this placeholder will be replaced by the value of the indicated field on the row you click on)
- Select _Menu Option_
- Action Type: _Navigation_
- Target: _same sheet_ as you are

This should create an empty Action, that does nothing, but in the menu (right click of the mouse) you will see, for each row, **Full Title: My Selected Title**.

Hope this helps!  
Andrea

---

<div class="post-metadata">

**Author:** ![ttientrung](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@ttientrung](https://community.amazonquick.com/u/ttientrung)\
**Post date:** [July 17, 2025, 9:49am UTC](https://community.amazonquick.com/t/cell-formatting/48271/3 "2025-07-17T09:49:02Z")

</div>

Hi @andrepgn, thank you for your reply.

Regarding the solution where you suggested creating a new calculated field to check the length of the title — I think using `substring` could help achieve that. However, one concern is that when I hover over the cell, I still want to be able to see the full title.

Also, at the moment, I’m unable to change the visual type from a table to something else, so the workaround you provided seems like something I can work with for now.

Thanks again!

---

<div class="post-metadata">

**Author:** ![andrepgn](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/andrepgn/32/25909_2.png) [@andrepgn](https://community.amazonquick.com/u/andrepgn)\
**Post date:** [July 17, 2025, 10:08am UTC](https://community.amazonquick.com/t/cell-formatting/48271/4 "2025-07-17T10:08:55Z")

</div>

Yes! You’re right, substring it’s even better 🙂  
If that solves the issue for the moment, I’ll edit my previous answer with substring and indicate it as solution!

For the tooltip, at the moment I say try with the workaround!

Thank you,  
have a nice one!

Andrea

---

<div class="post-metadata">

**Author:** ![andrepgn](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/andrepgn/32/25909_2.png) [@andrepgn](https://community.amazonquick.com/u/andrepgn)\
**Post date:** [July 17, 2025, 3:19pm UTC](https://community.amazonquick.com/t/cell-formatting/48271/5 "2025-07-17T15:19:36Z")

</div>


