Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello friends,
I have a set of date/time points (PointsInTime table).
For each point I need to show what event was translated on a TV at that point (Events table).
I used a calculated column in PointsInTime table:
Solved! Go to Solution.
Try the following:
EventWithOverlap = IF ( CALCULATE ( COUNTROWS ( EventsWithOverlap ), FILTER ( EventsWithOverlap, EventsWithOverlap[EventStartDateTime] <= PointsInTime[SomeDateTime] && EventsWithOverlap[EventEndDateTime] >= PointsInTime[SomeDateTime] ) ) > 1, CALCULATE ( FIRSTNONBLANK ( EventsWithOverlap[Event], TRUE () ), FILTER ( EventsWithOverlap, EventsWithOverlap[EventStartDateTime] <= PointsInTime[SomeDateTime] && EventsWithOverlap[EventEndDateTime] >= PointsInTime[SomeDateTime] ) ), BLANK () )
Does that give you what you want?
Let us know if that works for you @michaelshparber
you can try this as Calculated column:
EventWithOverlap = CALCULATE(FIRSTNONBLANK(EventsWithOverlap[Event],0),FILTER(EventsWithOverlap,EventsWithOverlap[EventStartDateTime]<='PointsInTime'[SomeDateTime]&&EventsWithOverlap[EventEndDateTime]>='PointsInTime'[SomeDateTime]))
Try the following:
EventWithOverlap = IF ( CALCULATE ( COUNTROWS ( EventsWithOverlap ), FILTER ( EventsWithOverlap, EventsWithOverlap[EventStartDateTime] <= PointsInTime[SomeDateTime] && EventsWithOverlap[EventEndDateTime] >= PointsInTime[SomeDateTime] ) ) > 1, CALCULATE ( FIRSTNONBLANK ( EventsWithOverlap[Event], TRUE () ), FILTER ( EventsWithOverlap, EventsWithOverlap[EventStartDateTime] <= PointsInTime[SomeDateTime] && EventsWithOverlap[EventEndDateTime] >= PointsInTime[SomeDateTime] ) ), BLANK () )
Does that give you what you want?
Let us know if that works for you @michaelshparber
you can try this as Calculated column:
EventWithOverlap = CALCULATE(FIRSTNONBLANK(EventsWithOverlap[Event],0),FILTER(EventsWithOverlap,EventsWithOverlap[EventStartDateTime]<='PointsInTime'[SomeDateTime]&&EventsWithOverlap[EventEndDateTime]>='PointsInTime'[SomeDateTime]))
I think you could use this Post. Its does a Time-bound Lookup too.
https://community.powerbi.com/t5/Desktop/DATE-RANGE-LOOKUP/td-p/420514
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
98 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |