Quantcast
Channel: Sam's Activities
Viewing all articles
Browse latest Browse all 3363

Show Top 10 records, order by its its Age - descending Order

$
0
0

Dear All,

I am facing an issue.

My requirement is very simple but i dont know why it is not able to get into the application.

There is a Calculated Field on Opportunity which calculates Opportunity records age by its formula.

Now i want to show top 10 most aged Opportunity in a chart. Very Simple one, right ?

Yes it seems simple as we can show my calculated column in Y axis and Opportunity in X axis and its done.

But i want top 10 records descending to its age.

My Chart data description is as below.

<datadescription>
    <datadefinition>
      <fetchcollection>
        <fetch mapping="logical" aggregate="true" top="10">
          <entity name="opportunity">
            <attribute name="opportunityid" groupby="true" alias="_CRMAutoGen_groupby_column_Num_0" />
            <attribute name="wn_age" aggregate="max" alias="_CRMAutoGen_aggregate_column_Num_0" />
            <order alias="_CRMAutoGen_aggregate_column_Num_0" descending="true" />
          </entity>
        </fetch>
      </fetchcollection>
      <categorycollection>
        <category alias="_CRMAutoGen_groupby_column_Num_0">
          <measurecollection>
            <measure alias="_CRMAutoGen_aggregate_column_Num_0" />
          </measurecollection>
        </category>
      </categorycollection>
    </datadefinition>
  </datadescription>

Still its not showing correct result.

Where i can be wrong ?

Please help. Thanks in advance.


Viewing all articles
Browse latest Browse all 3363

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>