Диаграмма CRM 2011 - Как показать все значения в легенде?

Используя стандартную CRM 2011 Opportunities by Sales Stage Funnel 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>

У кого-нибудь есть лучший способ сделать это?

1 ответ

Ваш подход не сработает, потому что, как вы упоминаете, диаграмма воронок, к сожалению, не допускает множественные серии. Если это так, вам также необходимо добавить теги вокруг каждого атрибута и фильтра, чтобы фильтр работал.

Я предполагаю, что ваша воронкообразная диаграмма показывает сумму для каждого этапа, поэтому вы можете добавить фиктивную запись для каждого из них и убедиться, что они включены в ваш просмотр. На фиктивной записи значения равны 0, поэтому они не будут вносить вклад в сумму. Вам просто нужно быть немного креативным с расширенным поиском, когда вкл. их.

Вы можете увидеть более продвинутый подход к добавлению фиктивных записей здесь 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/

Другие вопросы по тегам