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.
Hi all,
I have an AIRCRAFT table which contains data of when each aircraft starts and finishes operating for my company. If you notice, aircraft CCC starts operating later than AAA and BBB. This is where the challenge starts.
I also have a UTILIZATION table which contains data of the flights each aircraft does each day. For simplicity, each aircraft (AAA, BBB and CCC) operates 1 FC (Flight Cycle) each day.
I now want to filter the UTILIZATION table dynamically to filter only the flights that my company has flown (ie: I have to discard the flights that aircraft CCC did NOT operate for my company). So in this example, I would have to discard the rows with aircraft CCC flying on dates 01/01/2019 to 04/01/2019, as I have marked in yellow on the UTILIZATION table.
How can I do this dynamically/automatically referring to the AIRCRAFT table with the START and END dates for each aircraft? I think I would have to use a VAR but can't figure out how to make it work. Any help is very much appreciated.
Thanks and regards!
Solved! Go to Solution.
Hi @EH-IBS
Create relationship as below
Create calcuated columns in 'UTILIZATION' table
related_start = RELATED(AIRCRAFT[start]) related_start = RELATED(AIRCRAFT[start]) filter_column = IF([date]>=[related_start]&&[date]<=[related_end],1,0)
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @EH-IBS
Create relationship as below
Create calcuated columns in 'UTILIZATION' table
related_start = RELATED(AIRCRAFT[start]) related_start = RELATED(AIRCRAFT[start]) filter_column = IF([date]>=[related_start]&&[date]<=[related_end],1,0)
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-juanli-msft,
Thank you very much for your prompt reply.
It's indeed a very simple solution but I hadn't come accross the RELATED formula.
I guess this might decrease performance as I'm adding two more calculated columns, but it seems to work perfectly. I will have to implement it in the real case but I don't think there should be any other problems rising from this.
Thanks again and regards!
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 |
---|---|
110 | |
97 | |
78 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |