Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
klintala
Frequent Visitor

Unwanted Filter Back-propagation

.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.

Annotation 2020-04-08 135112.jpg

1 ACCEPTED SOLUTION
d_gosbell
Super User
Super User

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

View solution in original post

1 REPLY 1
d_gosbell
Super User
Super User

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

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.