Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 55831

CRM BI SSRS Report - Multi Bar Chart - Nested Inner Joins

$
0
0

I need to join two datasets I have for a multi-bar chart in SSRS since a chart can only be used with one dataset. Literally all this chart is meant to display is the amount of records created and amount of records in 4 "closed" statuses for the past 4 weeks every Friday. The two queries give me my desired results. My problem is joining them.

<fetch distinct='false' mapping='logical' aggregate='true'>
    <entity name='new_custom' >
            <filter type="or">
                  <condition attribute="createdon" operator="last-x-days" value="26" />
                  <condition attribute="new_statuschangedate" operator="last-x-days" value="26" />
            </filter>
    <link-entity name="new_custom" alias="custom_closed" to="new_customid" from="new_customid" link-type="inner">
           <attribute name='new_number' alias='Closed' aggregate='countcolumn' />
        <attribute name='new_statuschangedate' groupby='true' dategrouping='week' alias='closed_week' />
            <filter type="and">
                  <condition attribute="new_statuschangedate" operator="last-x-days" value="26" />
            <condition attribute="new_status" operator="in">
                            <value>977970001</value>
                            <value>977970003</value>
                            <value>977970005</value>
                            <value>977970002</value>
            </condition>
            </filter>
    </link-entity>

    </entity>
</fetch>

...and...

<fetch distinct='false' mapping='logical' aggregate='true'>
    <entity name='new_custom' >
            <filter type="or">
                  <condition attribute="createdon" operator="last-x-days" value="26" />
                  <condition attribute="new_statuschangedate" operator="last-x-days" value="26" />
            </filter>
    <link-entity name="new_custom" alias="custom_created" to="new_customid" from="new_customid" link-type="inner">
        <attribute name='new_number' alias='Created' aggregate='countcolumn'/>
        <attribute name='createdon' alias='created_week' groupby='true' dategrouping='week' distinct='true'/>
                    <filter type="and">
                <condition attribute="createdon" operator="last-x-days" value="26" />
                    </filter>
    </link-entity>
    </entity>
</fetch>

My desired result is one row joined by the week dategrouping; however, the dategrouping is derived from two different fields (statuschangedate - createdon). I'm assuming I need a nested inner join, but I can't find much info on it with FetchXML.

Any help is greatly appreciated.

Thanks,

Blayze


Viewing all articles
Browse latest Browse all 55831

Trending Articles



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