Hi all,
So when I include a percentOfTotal table calculation in a quicksight analysis (which works), and I pull the analysis definition and then recreate it, I’m greeted with the following error:
{
"Status": 200,
"Analysis": {
"AnalysisId": "AgentDistribution",
"Arn": "<arn>",
"Name": "AgentDistribution",
"Status": "CREATION_FAILED",
"Errors": [
{
"Type": "INVALID_TABLE_CALCULATION",
"Message": "Unsupported table calculation strategy",
"ViolatedEntities": [
{
"Path": "sheet/aecd088c-eb06-49f1-b936-73cd9329bad3/visual/1e69ab7b-a0a3-45d0-aa22-eef260c1c908/field/02126984-fff4-4f78-9c1d-937d3ccbc882.4.1701341193636"
}
]
}
],
"DataSetArns": [
"<arn>"
],
"CreatedTime": "2023-11-30T10:59:56.658000+00:00",
"LastUpdatedTime": "2023-11-30T10:59:57.232000+00:00",
"Sheets": []
},
"RequestId": "5ae9a94b-ee4d-4163-8803-374973725ef4"
}
So it seems that either Quicksight is writing the analysis definition incorrectly, or is reading it incorrectly when recreating.
The percentOfTotal calculation itself looks like this in the definition:
"Values": [
{
"CalculatedMeasureField": {
"FieldId": "02126984-fff4-4f78-9c1d-937d3ccbc882.4.1701341193636",
"Expression": "percentOfTotal(SUM({TimeInContactStateRaw}), [truncDate(\"MI\", {Date}),{ConnectUrl},{agentName}])"
}
}
]
Any help would be greatly apppreciated.
UPDATE: If I manually add a calculated field with the same expression (replacing the expanded calcultions with the field names) then it works, so seems like a bug with the table calculation functionality