Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Dynamics 365 Sales - Historical report

Hi all 🙂


This question is a general one, because I'm just starting my Power Bi journey.


I succesfully connected Power Bi to Dynamics and created some basic reports, but received a requirement to show some historical data also.

For example: "How many open opportunities we had in August" or/and "How many opportunities we had in 'Pending signature' state September 15". Not to show an actual data, but a historical one.


If I understand this properly, the only way to be able to implement it is to export Dynamics 365 Sales data every day to some database and connect PowerBi to this database.


My question is: what is the solution I better to look at in this case?


Because I've seen a possibility to connect via flows to Oracle, SQL Server and MySQL but I don't know if there is any limitations I need to be aware of.

Frequent Visitor

Hi @vahrameev ,


Short answer - you shouldn't need to export anything, just get creative with your functions and measures.


You can find a few different examples of measuring these KPIs on the BI forums, as well as some help articles (here's one for a similar ask, just HR related)


To accomplish this within CRM, you'd essentially be using the GENERATE functional along with a date table, and some conditional columns to determine what the state was at the end of the month (assuming you have a "date signed" field. If you don't have that, this is kind of shot). Here's an example of a GENERATE function I'm using in one of my CRM reports to determine the amount of value in the open pipeline at month end.

CRM_Extended_Opportunities = FILTER(GENERATE(Opportunities_XML, DISTINCT('Date'[MonthEnd])), Opportunities_XML[Created On] <= 'Date'[MonthEnd] && EOMONTH(Opportunities_XML[Actual Close Date], 0) >= 'Date'[MonthEnd])

 Hope this helps, and welcome to BI!

Hi @mick_swartz 


Thank you for your answer.


The main problem with my situation is that I don't have a date "attached" to Opportunity states I need to calculate in BI.


Thats why I thought exporting that data to an external source/database would give me more freedom in creating these reports.


Right now deciding may be it's easier to add necessary date field to Dynamics and work with that data.

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Kudoed Authors