Searching through multiple calculated fields in an analysis

I have an analysis, which has multiple calculated fields. I want to check the logic of each calculated field for a presence of a column from the dataset which is going to be deprecated soon.

Is there a way to list all calculated fields and their logic in a text format, so I can do a simple search for the column I am looking for? Instead of going through the calculated fields one by one in the analysis which is very tedious.

Thank you.

Hi @sagarj,

Welcome to the QuickSight Community and thank you for asking your question here.

This is possible, one approach is to use the latest AWS CLI, see instructions here for setting this up.
Note that, to access AWS services with the AWS CLI, you need an AWS account, IAM credentials, and an IAM access key pair. When running AWS CLI commands, the AWS CLI needs to have access to those AWS credentials.

Once installed you can use the following command to export the list of analyses in your account:
aws quicksight list-analyses --aws-account-id YOURAWSACCOUNTID > analyses.list

You can then search the output from the above command (in the file “analyses.list”) for the name of your analysis and from this find the associated analysis-id.

Once you have located your analysis-id, you can run the following command to output the analysis definition in JSON (which lists all of the calculated fields and their expressions).
aws quicksight describe-analysis-definition --aws-account-id YOURAWSACCOUNTID --analysis-id YOURANALYSISID > analysis.definition

You can then search the JSON in the analysis.definition file for the dataset column name that is to be deprecated.

I hope this answers your question, if it does, please mark my reply as a Solution to share this with the wider community.

Many Thanks, Andrew

1 Like