Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

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.

New Member

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

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!


Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.