I have a master KPI chart that has a detail KPI chart listening to it. The master KPI chart can have two measures (for simplicity): Eng Displ and Cylinders. The detail KPI chart then responds when the Eng Displ KPI is selected to show Cylinders broken down by business area:
I now want the detail KPI chart to break down Cylinders if it is selected without creating another details visualization (I want it all in the same visualization).
tl;dr I want a details visualization to change formulas depending on which part of a master visualization is selected.
There are a few steps to doing this.
Document.Properties['KPIMeasure'] = '(Avg([Eng Displ])
. Change the script formula depending on the KPI you are creating it for, but have it assign to the same Document Property you created earlier.${KPIMeasure}
. This will be set when a master KPI is selected to whatever formula that master KPI has (whatever is in the Python script).Of course, you can edit the python script to also change the name of the detail KPI dynamically as well. The one downside of this is column names, if changed in the table, will not update automatically in the Python script because it is seen as just a string.