Say you’re like me.  Say, like me, you love Dynamics 365.  Also say you love Power BI just like me.  Well then just like me, I’m sure you love the easy to deploy prebuilt solution templates (content packs) provided by Microsoft.  And of course, if you’re like me, you’re lazy. Assuming you fit the bill, you might also find that eventually you want to make some changes to those content packs.  Or maybe you have a few custom fields in Dynamics 365 that you want to bring into your nifty prebuilt report.  Small changes are very easy to do and there are some really great articles about how to changes things like data format or adding a new measure.  However, I was really struggling with finding the right walk through for adding custom fields.  The information is out there in pieces which took some digging.  Certainly, someone has pieced together the perfect guide but unfortunately I wasn’t able to find it.  Again, understand that I’m lazy. With some help from a friend here’s what I’ve done to add custom Dynamics 365 fields to my already deployed Power BI solution template.

Step 1: Install the Data Export add in from AppSource.

https://appsource.microsoft.com/en-US/product/dynamics-365/mscrm.44f192ec-e387-436c-886c-879923d8a448 As it turns out, the installation of the solution template already creates an export profile in your D365 tenant to stage your data in Azure SQL.  You can certainly see that database and do anything you want with it in SQL, but often times the changes I want to make have to do with adding source data.  Installing this add-in lets you control what you send. Note: the tool does other tricks too, and has some error logging for you, but I haven’t dug too much into those features yet.

Step 2: Make sure your entity has “change tracking” turned on.

Simple but important step.  Whether or not it’s a full blown custom entity or just a custom field on an existing entity, we need this enabled to pick up for exportation to Azure SQL.

Step 3: Select your Entities you want to add to the export.

Entity is as granular as it gets.  So, if you just need a few fields, you’ll have to select the whole entity and then parse out what you don’t need in SQL or later in Power BI.  Once you’re done, and the sync runs again, just refresh your Power BI file and Bob’s your uncle – there’s your custom field! Now it didn’t happen to me, but it could be you have to go into the standard query and add your fields by selecting additional columns.