Jason_Gonzalez I've added the Task History information to my data model. The data is actually stored in the msdyn_projecthistory table, with example M code below to access it. Environment URL is a parameter with the filepath to our environment. You can either create this parameter in your file, or rename it if you already have a similar parameter.
*** Disclaimer - The following is not a step by step guide on how to add Task History to your mode and assumes you have some basic knowledge of Power BI data modeling (star schema) & Power Query.
When establishing relationships in your model. I'm using the native table->field name's and they may vary in your model.
- Resource Name - Link msdyn_projecthistory->msdyn_xrmuserid field to the SystemUser->systemuserid field.
- Project ID - Link msdyn_projecthistory->msdyn_projectid field to msdyn_projects->msdyn_projectid field
- Task ID - If you are using the free Power BI template on GitHub you will need to correct the model. The Project Tasks table, native name is msdyn_projecttasks, needs to be split into a dim and fact tables. The modeling for this needs to be finalized, but for now in Power Query, I added a new Dims Project Tasks table, which only includes msdyn_projecttaskid and Task Name fields. I linked Dims Project Tasks to the original Project Task table using msdyn_projecttaskid and I linked the new Dims Project Tasks to the Project History table using msdyn_projecttaskid. Doing it this way doesn't break all of your existing reports, but eventually I'll move addition fields to the new new Dims Project Tasks table.
- I haven't established relationships with any of the additional msdyn_projecttaskid fields in my model, but I anticipate additional modeling changes will be required.
- M Code to add Task History to your model:
let
Source = Cds.Entities(#"Environment URL", [ReorderColumns=null, UseFormattedValue=null]),
entities = Source{[Group="entities"]}[Data],
msdyn_projecthistory = entities{[EntitySetName="msdyn_projecthistory"]}[Data]
in
msdyn_projecthistory