Forum Discussion
Get results from dynamically calculated tables
- 5 years ago
ScottA , Try a measure like this to related arrival time with bucket
calculate(countx(filter(Flights, Flights[arr time] >= Min(TimeBucket[from]) && Flights[arr time] <= max(TimeBucket[to])),[Flight Number]), values(flight[Flight Number]))
You might need to copies time bucket to get this for departure time
Thank you, this pointed me in the right direction. I just made a small amendment to accomplish having it dynamic depending on filter selection of base table
Flights From =
VAR SelectedBase = [Selected Base]
VAR FilteredFlightsFrom =
CALCULATETABLE ( Flights, Flights[Flight From] = SelectedBase )
RETURN
CALCULATE (
COUNTX (
FILTER (
FilteredFlightsFrom,
Flights[dep time] >= MIN ( 'Time Bucket'[Time From] )
&& Flights[dep time] <= MAX ( 'Time Bucket'[Time To] )
),
Flights[Flight Number]
),
VALUES ( Flights[Flight Number] )
)
ScottA , hope it working for you. Kudos to you.