Attempting export/import of Analysis but getting errors on import

Trying to setup some CI/CD process and other processes to manage releases of our quicksight artifacts. I’m able to sucessfully export import the datasources and datasets using the AWS SDK for .NET (Would work similarly for AWS CLI).

Analyses on the other hand are being very problematic. Exports are no problem. But imports on the other hand are problematic. Here is one example…

I get the following error:

Amazon.QuickSight.Model.InvalidParameterValueException: 
Only PrimaryValueFontSize display property can be defined when TargetValue and TrendGroup fields are empty,  
	 at Visual 3e572974-5b7a-4707-ad03-d5f5e6d48337, 
	 at Sheet 68f0d6db-9150-43e7-acd2-f08ff341a0f4.

The snippet of that particular visual is:

{
    "kpivisual": {
        "visualId": "3e572974-5b7a-4707-ad03-d5f5e6d48337",
        "title": {
            "visibility": "VISIBLE",
            "formatText": {
                "richText": "<visual-title>\n  <block align=\"center\">\n    <b>Total Shipments</b>\n  </block>\n</visual-title>"
            }
        },
        "subtitle": {
            "visibility": "VISIBLE"
        },
        "chartConfiguration": {
            "fieldWells": {
                "values": [
                    {
                        "categoricalMeasureField": {
                            "fieldId": "1c9a148f-79bd-4dd3-97ab-21c6fe2eec32.ShipmentId.0.1695150004529",
                            "column": {
                                "dataSetIdentifier": "vShipmentPackage",
                                "columnName": "ShipmentId"
                            },
                            "aggregationFunction": "DISTINCT_COUNT"
                        }
                    }
                ],
                "targetValues": [],
                "trendGroups": []
            },
            "sortConfiguration": {},
            "kpioptions": {
                "comparison": {
                    "comparisonMethod": "PERCENT_DIFFERENCE"
                },
                "primaryValueDisplayType": "ACTUAL",
                "secondaryValueFontConfiguration": {
                    "fontSize": {
                        "relative": "EXTRA_LARGE"
                    }
                },
                "sparkline": {
                    "visibility": "VISIBLE",
                    "type": "AREA"
                },
                "visualLayoutOptions": {
                    "standardLayout": {
                        "type": "VERTICAL"
                    }
                }
            }
        },
        "actions": [],
        "columnHierarchies": []
    }
}

I’m not sure what to do to fix. This is just one error. I’m having other/different errors for other analyses. Why does the exact data/response that I export error when trying to import? Feels buggy. Anyone else have ideas? Or have similar experience?

Hello @brendonparker , welcome to the Quicksight community!

When you say that this is only one error, do you mean you have been troubleshooting and this error, or similar errors, comes up on other visuals? And if so, is it isolated to KPI visuals specifically?

Hi @duncan

I only have a handful of analyses. I believe this error is unique to this analyses. I’m not 100% if I can easily reproduce it by adding a KPI Visual to another Analysis, but can try and get back to you.

The other errors I was referring to were different from the KPI Visual. Let me see if I can get some of those to report as well…

1 Like

I have two other analyses that are getting errors.

One is:

When color is present, product of CategoryItemsLimit and ColorItemsLimit should be a number between 1 and 5000,
         at Visual 7ea96c5a-acf7-452e-9de6-520b5215ee6f,
         at Sheet 76e5a226-141f-4afe-a269-ac2b976d3eca.

Related Visual:

"BarChartVisual": {
  "Actions": [],
  "ChartConfiguration": {
    "BarsArrangement": {
      "Value": "STACKED"
    },
    "CategoryAxis": {
      "AxisLineVisibility": {
        "Value": "VISIBLE"
      },
      "ScrollbarOptions": {
        "Visibility": {
          "Value": "HIDDEN"
        }
      },
      "TickLabelOptions": {
        "LabelOptions": {
          "FontConfiguration": {
            "FontSize": {
              "Relative": {
                "Value": "MEDIUM"
              }
            }
          },
          "Visibility": {
            "Value": "VISIBLE"
          }
        }
      }
    },
    "CategoryLabelOptions": {
      "AxisLabelOptions": [],
      "SortIconVisibility": {
        "Value": "HIDDEN"
      },
      "Visibility": {
        "Value": "HIDDEN"
      }
    },
    "ColorLabelOptions": {
      "AxisLabelOptions": [],
      "SortIconVisibility": {
        "Value": "VISIBLE"
      }
    },
    "ContributionAnalysisDefaults": [],
    "DataLabels": {
      "DataLabelTypes": [
        {
          "DataPathLabelType": {
            "Visibility": {
              "Value": "VISIBLE"
            }
          }
        }
      ],
      "LabelColor": "#6197E2",
      "LabelFontConfiguration": {
        "FontSize": {
          "Relative": {
            "Value": "MEDIUM"
          }
        }
      },
      "Overlap": {
        "Value": "DISABLE_OVERLAP"
      },
      "TotalsVisibility": {
        "Value": "VISIBLE"
      },
      "Visibility": {
        "Value": "VISIBLE"
      }
    },
    "FieldWells": {
      "BarChartAggregatedFieldWells": {
        "Category": [
          {
            "DateDimensionField": {
              "Column": {
                "ColumnName": "ShipDate",
                "DataSetIdentifier": "vShipmentPackage"
              },
              "DateGranularity": {
                "Value": "DAY"
              },
              "FieldId": "1c9a148f-79bd-4dd3-97ab-21c6fe2eec32.ShipDate.1.1684175307349",
              "HierarchyId": "0271d6df-75c6-4f04-83be-a0c928470701"
            }
          }
        ],
        "Colors": [
          {
            "CategoricalDimensionField": {
              "Column": {
                "ColumnName": "Carrier",
                "DataSetIdentifier": "vShipmentPackage"
              },
              "FieldId": "1c9a148f-79bd-4dd3-97ab-21c6fe2eec32.Carrier.1.1684175429435"
            }
          }
        ],
        "SmallMultiples": [],
        "Values": []
      }
    },
    "Legend": {
      "Height": "39px",
      "Position": {
        "Value": "TOP"
      },
      "Title": {
        "Visibility": {
          "Value": "VISIBLE"
        }
      },
      "Visibility": {
        "Value": "VISIBLE"
      }
    },
    "Orientation": {
      "Value": "VERTICAL"
    },
    "ReferenceLines": [],
    "SortConfiguration": {
      "CategoryItemsLimit": {
        "OtherCategories": {
          "Value": "EXCLUDE"
        }
      },
      "CategorySort": [
        {
          "FieldSort": {
            "Direction": {
              "Value": "ASC"
            },
            "FieldId": "1c9a148f-79bd-4dd3-97ab-21c6fe2eec32.ShipDate.1.1684175307349"
          }
        }
      ],
      "ColorItemsLimit": {
        "OtherCategories": {
          "Value": "EXCLUDE"
        }
      },
      "ColorSort": [],
      "SmallMultiplesLimitConfiguration": {
        "OtherCategories": {
          "Value": "EXCLUDE"
        }
      },
      "SmallMultiplesSort": []
    },
    "Tooltip": {
      "FieldBasedTooltip": {
        "AggregationVisibility": {
          "Value": "VISIBLE"
        },
        "TooltipFields": [
          {
            "FieldTooltipItem": {
              "FieldId": "1c9a148f-79bd-4dd3-97ab-21c6fe2eec32.ShipDate.1.1684175307349",
              "Visibility": {
                "Value": "VISIBLE"
              }
            }
          },
          {
            "FieldTooltipItem": {
              "FieldId": "1c9a148f-79bd-4dd3-97ab-21c6fe2eec32.Carrier.1.1684175429435",
              "Visibility": {
                "Value": "VISIBLE"
              }
            }
          }
        ],
        "TooltipTitleType": {
          "Value": "PRIMARY_VALUE"
        }
      },
      "SelectedTooltipType": {
        "Value": "DETAILED"
      },
      "TooltipVisibility": {
        "Value": "VISIBLE"
      }
    },
    "ValueAxis": {
      "GridLineVisibility": {
        "Value": "HIDDEN"
      },
      "TickLabelOptions": {
        "LabelOptions": {
          "FontConfiguration": {
            "FontSize": {
              "Relative": {
                "Value": "MEDIUM"
              }
            }
          },
          "Visibility": {
            "Value": "VISIBLE"
          }
        }
      }
    },
    "VisualPalette": {
      "ColorMap": [
        {
          "Color": "#3399FF",
          "Element": {
            "FieldId": "1c9a148f-79bd-4dd3-97ab-21c6fe2eec32.Carrier.1.1684175429435",
            "FieldValue": "Carrier1"
          }
        },
        {
          "Color": "#5D329F",
          "Element": {
            "FieldId": "1c9a148f-79bd-4dd3-97ab-21c6fe2eec32.Carrier.1.1684175429435",
            "FieldValue": "Carrier2"
          }
        },
        {
          "Color": "#8B5011",
          "Element": {
            "FieldId": "1c9a148f-79bd-4dd3-97ab-21c6fe2eec32.Carrier.1.1684175429435",
            "FieldValue": "Carrier3"
          }
        },
        {
          "Color": "#DDCFA4",
          "Element": {
            "FieldId": "1c9a148f-79bd-4dd3-97ab-21c6fe2eec32.Carrier.1.1684175429435",
            "FieldValue": "Carrier4"
          }
        },
        {
          "Color": "#A7DBE2",
          "Element": {
            "FieldId": "1c9a148f-79bd-4dd3-97ab-21c6fe2eec32.Carrier.1.1684175429435",
            "FieldValue": "Carrier5"
          }
        }
      ]
    }
  },
  "ColumnHierarchies": [
    {
      "DateTimeHierarchy": {
        "DrillDownFilters": [],
        "HierarchyId": "0271d6df-75c6-4f04-83be-a0c928470701"
      }
    }
  ],
  "Subtitle": {
    "Visibility": {
      "Value": "HIDDEN"
    }
  },
  "Title": {
    "FormatText": {
      "RichText": "\u003Cvisual-title\u003E\n  \u003Cinline font-size=\u002220px\u0022\u003E\n    \u003Cb\u003ETotal Shipments by Carrier\u003C/b\u003E\n  \u003C/inline\u003E\n\u003C/visual-title\u003E"
    },
    "Visibility": {
      "Value": "VISIBLE"
    }
  },
  "VisualId": "7ea96c5a-acf7-452e-9de6-520b5215ee6f"
}

And

6 validation errors detected: Value '0' at 'definition.sheets.1.member.visuals.5.member.lineChartVisual.chartConfiguration.forecastConfigurations.1.member.forecastProperties.predictionInterval' failed to satisfy constraint: Member must have value greater than or equal to 50; Value '0' at 'definition.sheets.1.member.visuals.5.member.lineChartVisual.chartConfiguration.forecastConfigurations.1.member.forecastProperties.seasonality' failed to satisfy constraint: Member must have value greater than or equal to 1; Value '0' at 'definition.sheets.1.member.visuals.6.member.lineChartVisual.chartConfiguration.forecastConfigurations.1.member.forecastProperties.predictionInterval' failed to satisfy constraint: Member must have value greater than or equal to 50; Value '0' at 'definition.sheets.1.member.visuals.6.member.lineChartVisual.chartConfiguration.forecastConfigurations.1.member.forecastProperties.seasonality' failed to satisfy constraint: Member must have value greater than or equal to 1; Value '0' at 'definition.sheets.1.member.visuals.7.member.lineChartVisual.chartConfiguration.forecastConfigurations.1.member.forecastProperties.predictionInterval' failed to satisfy constraint: Member must have value greater than or equal to 50; Value '0' at 'definition.sheets.1.member.visuals.7.member.lineChartVisual.chartConfiguration.forecastConfigurations.1.member.forecastProperties.seasonality' failed to satisfy constraint: Member must have value greater than or equal to 1

It doesn’t give me a specific visual. I’m hesitant to post the entire json of the analysis here.

Hey @brendonparker !

I think short term, the process does have some issues so as you go along you may need to create a support ticket with AWS.

For the the first part of your question, I suggest removing the (empty array) and leaving that totally blank:

"chartConfiguration": {
            "fieldWells": {
                "values": [
                    {
                        "categoricalMeasureField": {
                            "fieldId": "1c9a148f-79bd-4dd3-97ab-21c6fe2eec32.ShipmentId.0.1695150004529",
                            "column": {
                                "dataSetIdentifier": "vShipmentPackage",
                                "columnName": "ShipmentId"
                            },
                            "aggregationFunction": "DISTINCT_COUNT"
                        }
                    }
                ],
                "targetValues": ,
                "trendGroups": 
            }

Hello @brendonparker !

Did my post above help solve this particular error?

Hello @brendonparker !

Was my post above helpful? I think ultimately, if you are running into multiple errors like this it might be helpful to create an AWS support ticket.

It’s been a while since we have heard from you, but we would still like to help find the solution. If we do not hear from you in 3 days this post will be archived.