Group one datasource by another datasource

Technologies > Business Process Owner Views > Analysis Views > Rooms by Standard and Building -- 2D Chart

This chart example shows headcount by room standard and building. The second data source is grouped by the first using the parameter summaryValueForThisGroup in the data source restriction:

<dataSource id="rmxstdxbl2d_ds_groupingAxis" type="grouping">
<table name="rm" role="main"/>
<field name="bl_id" table="rm" groupBy="true"/>
</dataSource>

<dataSource id="rmxstdxbl2d_ds_dataAxis" type="grouping">
<table name="rm" role="main"/>
<field name="rm_std" table="rm" groupBy="true"/>
<field name="headcount" formula="sum" baseField="rm.count_em" dataType="number" size="6" decimals="0">
<title>Headcount</title>
</field>
<parameter name="summaryValueForThisGroup" dataType="text" value=""/>
<restriction type="sql" sql="bl_id = ${parameters['summaryValueForThisGroup']}"/>
</dataSource>

Use parameterized restrictions

View: http://localhost:8080/archibus/schema/ab-products/solutions/analysis/ab-ex-rmxstdmbl-2d-chart.axvw