Forum Discussion
Relationship problem
- 7 years ago
jrscaletta update relationship and measure as below
hImputadas = CALCULATE(SUM(msdyn_actuals[msdyn_quantity]), USERELATIONSHIP(msdyn_actuals[_msdyn_project_value], msdyn_projects[msdyn_projectid]), CROSSFILTER(msdyn_actuals[_msdyn_project_value], msdyn_projects[msdyn_projectid], Both ))
here is the output
Hi All!!
Table1: Projects (Filter)
Table 2: ProjectTasks (Primarykey)
Table 3: Actuals - time dedicated by task (Foreign key)
The problem is that are some lines on Actuals that doesn't have ProjectTask associate, but yes Project. Then, when I show "msdyn_quantity" from data, it shows the total time, not by task. That's is OK.
Then, I created a new Measure (himputadas), but it doesn't show the lines from actuals that not have ProjectTask associate. The time difference is my problem.
My relations:
My data:
196,82 is correct, but himputaciones need to show 196,82 too, with a line with msdyn_subject in blank.
My measure:
hImputadas = CALCULATE(SUM(msdyn_actuals[msdyn_quantity]);USERELATIONSHIP(msdyn_actuals[_msdyn_task_value];msdyn_projecttasks[msdyn_projecttaskid]))
I tried too with CROSSFILTER and changing relations direction.
I attach PBIX file: PBIX FILE
Thanks in advance!