Today I was working with the Project Online Projects and ProjectWorkflowStageDataSet tables in PowerBI. I wanted to created a chart that showed data points that involved workflow status, projects, tasks. The many to one relationship between the ProjectWorkflowStageDataSet and Projects table was causing an issue when combining these data-points. This required I create a filtered version of the ProjectWorkflowStageDataSet table that created a one-to-one relationship between the tables. I used the SUBTBALE command to create a filtered version of the ProjectWorkflowStageDataSet table that did the trick. I filtered for the active stage and the closed stage in case the project had ended.
SubTable WorkFlowStatusActive = CALCULATETABLE(ProjectWorkflowStageDataSet, FILTER(ProjectWorkflowStageDataSet, OR (ProjectWorkflowStageDataSet[StageStatus] = 1, ProjectWorkflowStageDataSet[StageStatus] = 6)))