Create-analysis fails when using json from describe-analysis-definition command

To utilize the new API

-. generated skeleton
aws quicksight create-analysis --generate-cli-skeleton > repo/skeleton-spend-analysis-as_cmf_.json

-. fetched analysis definition
aws quicksight describe-analysis-definition --aws-account-id $account_a_id --analysis-id $analysis_id > repo/def-analysis-as_cmf_.json

-. update skeleton with definition info
copied over some info to skeleton file

image

-. now create analysis based on this updated skeleton file
aws quicksight create-analysis --cli-input-json file://./repo/skeleton-spend-analysis-as_cmf_.json

But, the command returned an error like below. how to debug this ?

An error occurred (InvalidParameterValueException) when calling the CreateAnalysis operation: Left hand side of the expression should be same for all the icon custom conditions. Please provide the expression in the following format. Eg. SUM({age} > 100. Literal values, operator and left side operand can be any of the accepted values,
at Visual xxxx
at Sheet xxxx

In the skeleton, I removed 3 params like Parameters, Permissions, SourceEntity because it wasn’t mentioned in the post.

Are these causing the issue?

Hello @tbdori !

We would need more information from the JSON but what you should be able to do is go to the Visual and Sheet the error named, and apply the logic for the conditional formatting that you or the dashboard author applied to the visual.

Hello @tbdori !

Are you still running into this error and if so are you able to share an anonymized view of the JSON file that you are creating?

Hello @tbdori !

If you are still running into this error please feel free to repost this question at the top of the community. You can also link this question to your new post.

I am going to archive this question.