Forum Discussion
DonPepe
3 years agoHelper II
Find element in another table based on DateTime range
Hi, I struggle to link two element in two different table. So I have two table ; "Planned route" and "Actual route". I want to compare if all my planned rout are well executed. ...
- 3 years ago
Hi DonPepe
Thanks for reaching out to us.
you can try this measure
Measure = var _start=MIN(StagPlannedData[PlarouDateTime])-2/24 var _end= MIN(StagPlannedData[PlarouDateTime])+2/24 var _count=CALCULATE(COUNTROWS(StagFullYearDLL),FILTER(ALL(StagFullYearDLL),StagFullYearDLL[ActrouDateTime]<=_end && StagFullYearDLL[ActrouDateTime]>=_start)) return IF(_count>=1,"Y","N")Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
v-xiaotang
3 years agoCommunity Support
Hi DonPepe
Thanks for reaching out to us.
you can try this measure
Measure =
var _start=MIN(StagPlannedData[PlarouDateTime])-2/24
var _end= MIN(StagPlannedData[PlarouDateTime])+2/24
var _count=CALCULATE(COUNTROWS(StagFullYearDLL),FILTER(ALL(StagFullYearDLL),StagFullYearDLL[ActrouDateTime]<=_end && StagFullYearDLL[ActrouDateTime]>=_start))
return IF(_count>=1,"Y","N")
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
DonPepe
3 years agoHelper II
Hi v-xiaotang ,
Thanks for your help !
Unfortunately I had the same results than my previous measure, so finaly I did multiple merges in Powerquery and now I have what I want.
Thanks again for your help,
Don