web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

CRM SSRS Charts

(0) ShareShare
ReportReport
Posted on by

Hi all,

I have a chart in CRM that I would like to re-create in a PDF.

The report is a weekly report. I would like to capture, based on the createdon field, grouped by week, the last 4 weeks of data in a bar chart. So it'd look like this, which is on a CRM dashboard, except grouped by week, which you can choose as an option within CRM:

3240.Capture.JPG

It seems like it would be simple to group by weeks in SSRS, but I can't seem to figure it out. I appreciate any help!

Best,

Blayze

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Dhaval mistry Profile Picture
    810 on at

    you can group by using DatePart() SQL function its easy trick you need to do it in SQL with one extra column

    Sample of DatePart()

    stackoverflow.com/.../group-by-week-with-sql

    More information about Datepart()

    msdn.microsoft.com/.../ms174420.aspx

    DATEPART(wk, date_column) return week number

    Happy SQL Query

  • Community Member Profile Picture
    on at

    Thanks Dhaval! I am using CRM Online so need to use FetchXML, but this led me to my answer. This runs every Friday, so the 33 days reflects data dating back to the Sunday beginning the first week:

    <fetch distinct='false' mapping='logical' aggregate='true'>

    <entity name='new_entityname'>

      <attribute name='new_uniqueid' alias='countID' aggregate='count' />

      <attribute name='createdon' groupby='true' dategrouping='week' alias='week' />

        <filter>

          <condition attribute="createdon" operator="last-x-days" value="33" />

        </filter>

    </entity>

    </fetch>

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans