Calculated field generates an SQL exception in some graphs

When trying to use a calculated field to distinguish my data between two groups, and there is the case where all the data fall into one group, the graph shows that “Your database generated an SQL exception”.
I’m pretty certain however that the error does not originate from the calculated field expression itself, since I can observe the value for that calculated field in a table without any errors

The error can be reproduced by creating a calculated field with the following expression:

ifelse(
FALSE, ‘LEFT’,
‘RIGHT’
)

Afterwards, create for example a line chart with the created calculated field in the “color” section, and the error manifests.

Do you know what may be causing this behaviour, and how I can achieve this in a way that doesn’t trigger this error?

Thank you

1 Like

Hi @carlos.sousa - Can you please more details like you are facing the issue while using custom sql. this will help community to provide right suggestion.

Regards - Sanjeeb

Yes of course. We are just importing a dataset from Redshift, and accessed with Direct Query

Have you been able to reproduce the issue? We are still experiencing this on our side

@carlos.sousa ,

As this query is failing in direct query when connected to Redshift, maybe check the query which is executed in Redshift and debug to know the reason for it’s failure.

You can decide on opening a support case for further resolution.

Kind regards,
Koushik

I have checked and there is no problem with the query to Redshift. Additionally, as I mentioned earlier, the exact same field works and displays a value correctly when used in a table inside quicksight, so the problem occurs when using it with some graph types, such as a line chart in my case

@carlos.sousa ,

thanks for the update. Please raise a support case with the details on the graph which is failing / that which succeeded .

Kind regards,
Koushik

Where can I raise this support case? Is there any portal specific to Quicksight?
Thank you

Here are the steps to open a support case so that we can help you further: Creating support cases and case management - AWS Support . If your company has an internal IT team, you might not have direct access to AWS Support and will need to raise an internal ticket to your IT team. They’ll open an AWS Support case on your behalf.

Hi @carlos.sousa,
It’s been awhile since we last heard from you on this thread, were you able to get a support ticket created for your case and if so, were they able to assist further?

If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you!

Hi @carlos.sousa,
Since we have not heard back, I’ll go ahead and close out this topic. However, if you have any additional questions, feel free to create a new post in the community and link this discussion for relevant information if needed.

Thank you!