従業員の欠勤を半日 (午前と午後) に分けて表現するエンティティがあります。エンティティには 4 つの関連フィールドがあります: 従業員名 (別のカスタム エンティティ)、欠勤の理由 (休日、残業代の払い戻し、有給休暇、許可された休暇、... 合計 11)、欠勤日、およびそれが AM か AM かPM 不在 (2 つの値を使用したドロップダウン)。従業員が 1 日中不在の場合、午前に 1 つ、午後に 1 つの 2 つのレコードが作成されます。
次のことを示すグラフを作成する必要があります。
従業員ごとにすべての欠勤をグループ化します (5 人の欠勤従業員は 5 グループです)。欠勤理由ごとに特定の従業員のすべての欠勤をグループ化します (2 つの異なる欠勤を持つ従業員は、グループ内で隣接する 2 つの列を取得します)。表示されるデータは、日付ごとにグループ化されたすべての欠席の数です (同じ日の午前 1 時と午後 1 時の 2 回の欠席は、2 回ではなく 1 回の欠席としてカウントされます)。実際には、一意の日付の数が必要です。
従業員と欠勤理由のグループが完成した基本的なグラフを作成することができました。ただし、一意の日付を数える方法がわかりません。
私がこれまでに持っているものは次のとおりです。
<visualization>
<visualizationid>{CA31385D-FE63-E311-A895-005056A03018}</visualizationid>
<name>Datum afwezigheid bij personeelsfiche en reden van afwezigheid</name>
<primaryentitytypecode>acm_tijdindeling</primaryentitytypecode>
<datadescription>
<datadefinition>
<fetchcollection>
<fetch mapping="logical" aggregate="true">
<entity name="acm_tijdindeling">
<attribute groupby="true" alias="group_personeelsfiche" name="acm_personeelsfiche" />
<attribute alias="count_datumafwezigheid" name="acm_datumafwezigheid" aggregate="count" />
<attribute groupby="true" alias="group_redenvanafwezigheid" name="acm_redenvanafwezigheid" />
</entity>
</fetch>
</fetchcollection>
<categorycollection>
<category alias="group_personeelsfiche">
<measurecollection>
<measure alias="count_datumafwezigheid" />
</measurecollection>
</category>
</categorycollection>
</datadefinition>
</datadescription>
<presentationdescription>
<Chart Palette="None" PaletteCustomColors="55,118,193; 197,56,52; 149,189,66; 117,82,160; 49,171,204; 255,136,35; 97,142,206; 209,98,96; 168,203,104; 142,116,178; 93,186,215; 255,155,83">
<Series>
<Series ChartType="Column" IsValueShownAsLabel="True" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="PointWidth=0.75, MaxPixelPointWidth=40"></Series>
</Series>
<ChartAreas>
<ChartArea BorderColor="White" BorderDashStyle="Solid">
<AxisY LabelAutoFitMinFontSize="8" TitleForeColor="59, 59, 59" TitleFont="{0}, 10.5px" LineColor="165, 172, 181" IntervalAutoMode="VariableCount">
<MajorGrid LineColor="239, 242, 246" />
<MajorTickMark LineColor="165, 172, 181" />
<LabelStyle Font="{0}, 10.5px" ForeColor="59, 59, 59" />
</AxisY>
<AxisX LabelAutoFitMinFontSize="8" TitleForeColor="59, 59, 59" TitleFont="{0}, 10.5px" LineColor="165, 172, 181" IntervalAutoMode="VariableCount">
<MajorTickMark LineColor="165, 172, 181" />
<MajorGrid LineColor="Transparent" />
<LabelStyle Font="{0}, 10.5px" ForeColor="59, 59, 59" />
</AxisX>
</ChartArea>
</ChartAreas>
<Titles>
<Title Alignment="TopLeft" DockingOffset="-3" Font="{0}, 13px" ForeColor="59, 59, 59"></Title>
</Titles>
<Legends>
<Legend Alignment="Center" LegendStyle="Table" Docking="right" IsEquallySpacedItems="True" Font="{0}, 11px" ShadowColor="0, 0, 0, 0" ForeColor="59, 59, 59" />
</Legends>
</Chart>
</presentationdescription>
<isdefault>false</isdefault>
</visualization>
集計に追加しようとしましgroupby="true" dategrouping="day"たcount_datumafwezigheidが、「無効な XML」エラーが発生します。