Can you use two different aggregate models in one chart?

This is definitely feasible, and no need to dig into the XML to monkey with context. The key issue is that you don’t use Context to isolate on the rows to be shown in the drill down chart because its also an aggregate and likely doesn’t have rows that correspond with the aggregations from the first chart. Instead - your drill down actions need to send the value of the point - using {{$Chart.point.name}} merge notation - into a condition on the drilldown model, and then requery that model before exposing the drill down chart.

I’ve built a simple Account and contact aggregation chart page for you. It should be a good basis for your further exploration.

<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true">
<models>
<model id="AccountAgg" query="true" createrowifnonefound="false" datasource="salesforce" sobject="Account" type="aggregate">
<fields>
<field id="Id" name="countId" function="COUNT"/>
</fields>
<conditions/>
<actions/>
<groupby method="simple">
<field id="Type" name="type"/>
</groupby>
</model>
<model id="ContactAgg" query="false" createrowifnonefound="false" datasource="salesforce" sobject="Contact" type="aggregate">
<fields>
<field id="Id" name="countId" function="COUNT"/>
</fields>
<conditions>
<condition type="fieldvalue" value="" enclosevalueinquotes="true" field="Account.Type" state="filterableoff" inactive="true" name="Account.Type"/>
</conditions>
<actions/>
<groupby method="simple">
<field id="MailingState" name="mailingState"/>
</groupby>
</model>
</models>
<components>
<skuidvis__chartset>
<charts>
<skuidvis__chart model="AccountAgg" maintitle="{{Model.labelPlural}}" type="column" uniqueid="sk-3_eo-111">
<dataaxes>
<axis id="axis1"/>
</dataaxes>
<categoryaxes>
<axis id="categories" categorytype="field" field="type"/>
</categoryaxes>
<serieslist>
<series valuefield="countId" splittype="none">
<actions>
<action type="setCondition" model="ContactAgg" condition="Account.Type" value="{{$Chart.point.name}}"/>
<action type="requeryModel" model="ContactAgg" behavior="standard"/>
<action type="drilldown" chartid="sk-3_fF-163">
<conditions/>
</action>
</actions>
</series>
</serieslist>
<colors/>
<legend layout="horizontal" halign="center" valign="bottom"/>
</skuidvis__chart>
<skuidvis__chart model="ContactAgg" maintitle="{{Model.labelPlural}}" type="column" uniqueid="sk-3_fF-163">
<dataaxes>
<axis id="axis1"/>
</dataaxes>
<categoryaxes>
<axis id="categories" categorytype="field" field="mailingState"/>
</categoryaxes>
<serieslist>
<series valuefield="countId" splittype="none"/>
</serieslist>
<colors/>
<legend layout="horizontal" halign="center" valign="bottom"/>
<renderconditions logictype="and"/>
</skuidvis__chart>
</charts>
</skuidvis__chartset>
</components>
<resources>
<labels/>
<javascript/>
<css/>
<actionsequences uniqueid="sk-3_ej-97"/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>