2

使用默认的 CRM 2011 Opportunities by Sales Stage Funnel Chart,即使没有每个阶段的数据,如何让它显示图例中的所有阶段?这似乎是一个简单的问题,但我很难过。

Chart 仅显示 Fetch 检索到的数据,Fetch 不一定每个阶段都至少有一个记录。此外,漏斗图不能有多个系列。

这是我想出的,但它不能用作漏斗图。对于这种类型的数据,至少通过布局交换到雷达图是毫无价值的。

<visualization>
  <visualizationid>{BA88CAC2-637F-E011-8E24-00155D840900}</visualizationid>
  <name>Opportunities by Sales Stage</name>
  <primaryentitytypecode>opportunity</primaryentitytypecode>
  <datadescription>
    <datadefinition>
      <fetchcollection>
        <fetch mapping="logical" aggregate="true">
            <entity name="opportunity">
                <attribute alias="aggregate_column_1" name="opportunityid" aggregate="count" />
                <attribute groupby="true" alias="groupby_column" name="salesstagecode">
                    <filter type="or">
                        <condition attribute="salesstagecode" operator="eq" value="1" />
                    </filter>
                </attribute>
                <attribute alias="aggregate_column_2" name="opportunityid" aggregate="count">
                    <filter type="or">
                        <condition attribute="salesstagecode" operator="eq" value="200000" />
                    </filter>
                </attribute>
                <attribute alias="aggregate_column_3" name="opportunityid" aggregate="count">
                    <filter type="or">
                        <condition attribute="salesstagecode" operator="eq" value="200001" />
                    </filter>
                </attribute>
                <attribute alias="aggregate_column_4" name="opportunityid" aggregate="count" >
                    <filter type="or">
                        <condition attribute="salesstagecode" operator="eq" value="200002" />
                    </filter>
                </attribute>
                <attribute alias="aggregate_column_5" name="opportunityid" aggregate="count">
                    <filter type="or">
                        <condition attribute="salesstagecode" operator="eq" value="100000000" />
                    </filter>
                </attribute>
                <attribute alias="aggregate_column_6" name="opportunityid" aggregate="count">
                    <filter type="or">
                        <condition attribute="salesstagecode" operator="eq" value="100000001" />
                    </filter>
                </attribute>
                <attribute alias="aggregate_column_7" name="opportunityid" aggregate="count" >
                    <filter type="or">
                        <condition attribute="salesstagecode" operator="eq" value="100000002" />
                    </filter>
                </attribute>
                <attribute alias="aggregate_column_8" name="opportunityid" aggregate="count">
                    <filter type="or">
                        <condition attribute="salesstagecode" operator="eq" value="100000003" />
                    </filter>
                </attribute>
            </entity>
        </fetch>
      </fetchcollection>
      <categorycollection>
        <category>
          <measurecollection>
            <measure alias="aggregate_column_1" />
          </measurecollection>
            <measurecollection>
                <measure alias="aggregate_column_2" />
            </measurecollection>
            <measurecollection>
                <measure alias="aggregate_column_3" />
            </measurecollection>
            <measurecollection>
                <measure alias="aggregate_column_4" />
            </measurecollection>
            <measurecollection>
                <measure alias="aggregate_column_5" />
            </measurecollection>
            <measurecollection>
                <measure alias="aggregate_column_6" />
            </measurecollection>
            <measurecollection>
                <measure alias="aggregate_column_7" />
            </measurecollection>
            <measurecollection>
                <measure alias="aggregate_column_8" />
            </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="Funnel" Name="o:salesstagecode,1" Color="55,118,193" IsValueShownAsLabel="true" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="FunnelLabelStyle=Outside, FunnelNeckHeight=0, FunnelPointGap=1, FunnelNeckWidth=5 ">
              <SmartLabelStyle Enabled="True" />
          </Series>
          <Series ChartType="Funnel" Name="o:salesstagecode,200000" Color="197,56,52" IsValueShownAsLabel="true" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="FunnelLabelStyle=Outside, FunnelNeckHeight=0, FunnelPointGap=1, FunnelNeckWidth=5 ">
              <SmartLabelStyle Enabled="True" />
          </Series>
          <Series ChartType="Funnel" Name="o:salesstagecode,200001" Color="149,189,66" IsValueShownAsLabel="true" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="FunnelLabelStyle=Outside, FunnelNeckHeight=0, FunnelPointGap=1, FunnelNeckWidth=5 ">
              <SmartLabelStyle Enabled="True" />
          </Series>
          <Series ChartType="Funnel" Name="o:salesstagecode,200002" Color="117,82,160" IsValueShownAsLabel="true" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="FunnelLabelStyle=Outside, FunnelNeckHeight=0, FunnelPointGap=1, FunnelNeckWidth=5 ">
              <SmartLabelStyle Enabled="True" />
          </Series>
          <Series ChartType="Funnel" Name="o:salesstagecode,100000000" Color="49,171,204" IsValueShownAsLabel="true" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="FunnelLabelStyle=Outside, FunnelNeckHeight=0, FunnelPointGap=1, FunnelNeckWidth=5 ">
              <SmartLabelStyle Enabled="True" />
          </Series>
          <Series ChartType="Funnel" Name="o:salesstagecode,100000001" Color="255,136,35" IsValueShownAsLabel="true" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="FunnelLabelStyle=Outside, FunnelNeckHeight=0, FunnelPointGap=1, FunnelNeckWidth=5 ">
              <SmartLabelStyle Enabled="True" />
          </Series>
          <Series ChartType="Funnel" Name="o:salesstagecode,100000002" Color="97,142,206" IsValueShownAsLabel="true" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="FunnelLabelStyle=Outside, FunnelNeckHeight=0, FunnelPointGap=1, FunnelNeckWidth=5 ">
              <SmartLabelStyle Enabled="True" />
          </Series>
          <Series ChartType="Funnel" Name="o:salesstagecode,100000003" Color="209,98,96" IsValueShownAsLabel="true" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="FunnelLabelStyle=Outside, FunnelNeckHeight=0, FunnelPointGap=1, FunnelNeckWidth=5 ">
              <SmartLabelStyle Enabled="True" />
          </Series>
      </Series>
      <ChartAreas>
        <ChartArea>
          <Area3DStyle Enable3D="True" />
        </ChartArea>
      </ChartAreas>
      <Legends>
        <Legend Alignment="Center" LegendStyle="Table" Docking="right" IsEquallySpacedItems="True" Font="{0}, 11px" ShadowColor="0, 0, 0, 0" ForeColor="59, 59, 59" />
      </Legends>
      <Titles>
        <Title Alignment="TopLeft" DockingOffset="-3" Font="{0}, 13px" ForeColor="0, 0, 0"></Title>
      </Titles>
    </Chart>
  </presentationdescription>
  <isdefault>false</isdefault>
</visualization>

有没有人有更好的方法来做到这一点?

4

1 回答 1

0

您的方法行不通,因为正如您所提到的,漏斗图很遗憾不允许多个系列。如果是这样,您还需要在每个属性和过滤器周围添加标签,以便过滤器工作。

我假设您的漏斗图显示了每个阶段的总和,因此您可以为每个阶段添加一个虚拟记录,并确保这些记录包含在您的视图中。在虚拟记录上,这些值为 0,因此它们不会对总和做出贡献。包含时,您只需要对 Advanced Find 有一点创意。他们。

您可以在此处查看添加虚拟记录的更高级方法http://crmchartguy.wordpress.com/2013/01/23/include-records-with-no-value-in-charts/

如果您有一个堆积柱形图,那么您对 ​​xml 采用的方法将起作用,尽管您需要添加上述标签。你可以在这里看到一个例子http://crmchartguy.wordpress.com/2013/03/10/aggregate-total-on-top-of-stacked-column-charts-or-bar-charts-in-ms- CRM-2011/

于 2013-03-18T22:14:54.880 回答