Calculated field as string

I have a calculated field, where the result is a string (AAA or AA or BBB or BB or CCC or CC).
I need to show this result in a single large visual, similar to this:

Hi @alanwutke - Can you please explore adding insight functionality for this requirement.

Hi @duncan - Any expert advise from your side.

Regards - Sanjeeb


Can you give me some examples of how to do it, as I’ve already made several attempts using insights, but every time I get an error.

@alanwutke can you share your sample data?

I also can’t imagine what will be the value of the max() operation on a bunch of text values, if that’s what you are trying to do.

1 Like

Hello @nshah-quicksight
This is the calculated field that generates the ratings:

{calc_score_finan} >= 95 AND {calc_score_finan} <= 100, ‘AAA’,
{calc_score_finan} >= 90 AND {calc_score_finan} <= 94, ‘AA’,
{calc_score_finan} >= 85 AND {calc_score_finan} <= 89, ‘A’,
{calc_score_finan} >= 75 AND {calc_score_finan} <= 84, ‘BBB’,
{calc_score_finan} >= 65 AND {calc_score_finan} <= 74, ‘BB’,
{calc_score_finan} >= 50 AND {calc_score_finan} <= 64, ‘B’,
{calc_score_finan} >= 30 AND {calc_score_finan} <= 49, ‘CCC’,
{calc_score_finan} >= 20 AND {calc_score_finan} <= 29, ‘CC’,
{calc_score_finan} >= 10 AND {calc_score_finan} <= 19, ‘C’,

Next, I want to show just the ranking, just like this example:


@alanwutke I am looking for the dataset… does it have 1 row or multiple rows?

1 Like

The dataset has several rows.
The result of the calculated field calc_classificacao_total is the same for all lines, depending on the filter applied.

Hi @alanwutke,

You can try a bottom ranked or top ranked insight. Just set the number of results to 1 (default is 3) and format the text as needed.

For example, I can show a product name like this in a bottom/top ranked insight:

I’ve already tried running it this way, but the same errors occur:

It’s as if there was something wrong with the calculated field, I can’t use its data in insight

Maybe calculated fields are not supported in insights. Can you try to move the calculation to your dataset?


Got it, I’m going to change the calculated fields to the dataset.
I haven’t done this test yet.
I bring news.
Thank you for now.

I created the fields directly in the dataset and used them in insights, but the error remains :sob: :sob::

Can you show the calculated field that you’re using in the Values field well? Just for troubleshooting, try to put a different field in the Values field well and see if it still gives you the error.

1 Like

@alanwutke The calculated field you have is a row-level calculation. You can simply filter for the corresponding dimension at the row level and show only the value in a a single-cell table like this:

Would it help?

1 Like

Thanks for the answer @gillepa
I have already managed to show it as a Single Table, but it is not visually as expected by the client, who wants larger letters.
I’m trying to create the calculated fields that generate the classification as a calculated field in the dataset, and then try to use the insight.

Sorry for the delay in responding @David_Wong
Below are the 2 calculated fields that I am creating in the dataset.




{calc_score_finan_1} >= 95 AND {calc_score_finan_1} <= 100, ‘AAA’,
{calc_score_finan_1} >= 90 AND {calc_score_finan_1} <= 94, ‘AA’,
{calc_score_finan_1} >= 85 AND {calc_score_finan_1} <= 89, ‘A’,
{calc_score_finan_1} >= 75 AND {calc_score_finan_1} <= 84, ‘BBB’,
{calc_score_finan_1} >= 65 AND {calc_score_finan_1} <= 74, ‘BB’,
{calc_score_finan_1} >= 50 AND {calc_score_finan_1} <= 64, ‘B’,
{calc_score_finan_1} >= 30 AND {calc_score_finan_1} <= 49, ‘CCC’,
{calc_score_finan_1} >= 20 AND {calc_score_finan_1} <= 29, ‘CC’,
{calc_score_finan_1} >= 10 AND {calc_score_finan_1} <= 19, ‘C’,