Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
.pbix file: https://drive.google.com/open?id=1qHiPG7lmN5dJJZhiGRrmNNBk31gyzbNG
I'm trying to have a table return all jobs that have a CurrentDate for a specific Task (task4) within a specific timeframe., >Today()-30.
Under those jobs I want to see all the HistoricalDates of specific tasks (task3 and task4).
Using CALCULATE to filter CurrentSchedule seems to unexpectedly filter the Task, even with the given crossfilter directions.
Disabing this relationship retuns expected results, however, using CROSSFILTER(CurrentSchedule[Task],Task[Task],None) to remove the relationship does not work.
Solved! Go to Solution.
So I think the issue is that you are not actually creating Job and Task filters, you are creating filters on ScheduleAudit and CurrentSchedule. Changing the expression as follows to create a list of Job IDs and Tasks seems to return the result you desire
TestMeasure2 =
var JobSelection = TREATAS(
CALCULATETABLE(
values(CurrentSchedule[ID]),
Filter(CurrentSchedule, CurrentSchedule[Task] = "task4"
&& CurrentSchedule[CurrentDate]> TODAY () - 30)
)
, ID_Master[ID])
Var TaskSelection = TREATAS({"task3", "task4"}, Task[Task])
var result =
CALCULATE (
SUM (ScheduleAudit[StartChange] ),
JobSelection,
TaskSelection
)
return result
So I think the issue is that you are not actually creating Job and Task filters, you are creating filters on ScheduleAudit and CurrentSchedule. Changing the expression as follows to create a list of Job IDs and Tasks seems to return the result you desire
TestMeasure2 =
var JobSelection = TREATAS(
CALCULATETABLE(
values(CurrentSchedule[ID]),
Filter(CurrentSchedule, CurrentSchedule[Task] = "task4"
&& CurrentSchedule[CurrentDate]> TODAY () - 30)
)
, ID_Master[ID])
Var TaskSelection = TREATAS({"task3", "task4"}, Task[Task])
var result =
CALCULATE (
SUM (ScheduleAudit[StartChange] ),
JobSelection,
TaskSelection
)
return result