2013-12-13 40 views
0

我有一個實體表示每半天(AM和PM)員工缺勤分裂。該實體有4個相關字段:員工姓名(另一個自定義實體),缺席(假期,加班費報銷,帶薪休假,允許休假,...共計11次),缺席日期以及是AM還是PM缺席(使用2個值下拉)。如果員工全天缺席,則會創建2條記錄,其中1條記錄爲AM,1條記錄爲PM。CRM 2011圖:其他領域的分組日期數

我現在必須作出的曲線圖,其示出了以下內容:

組每個僱員的缺勤所有(5名缺席員工是5組); 根據每個缺勤原因對特定員工的所有缺席進行分組(缺勤2名的員工在其組中有2個相鄰列); 顯示的數據是所有缺勤的計數,按日期分組(2個缺勤,上午1點和下午1點,在同一日期應計爲1缺勤,而不是2)。實際上,我需要一些獨特的日期。

我設法做了一個基本的圖,其中有員工和缺席理由組完成。但是,我無法弄清楚如何計算獨特的日期。

什麼我目前得到的是:

<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」的錯誤。

回答

0

我有一個類似的問題一次 - 林不知道其可能聚集的DateTime - 參見主題: Fetch DateTime CRM 2011