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

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.

Reply

Need help with filters on report

I am trying to create a report that shows the total and past flight time for pilots for each upcoming trip. When I filter for upcoming trip dates it also filters out the total and past fight times. I have unsuccesfully tried to use and "All" or "AllExcept" filter in my measures but they have not worked. Here are my current measures.

 
Total Flight Time = CALCULATE(SUMX('bi FlightDataAnalysis', 'bi FlightDataAnalysis'[ActualFlightDec]),'bi FlightDataAnalysis'[TripActive] = TRUE(), ALLSELECTED('bi FlightLegCrew'[FirstName] ))

 

Last 90 day flight  time = CALCULATE([Sum Flight Time], DATEADD(Dates[Date],-90,DAY))
 
Here is the report I am trying to create:
PeterBlatchley_0-1679946274583.png

Here is my model:

PeterBlatchley_2-1679946432300.png

 

Thanks for the help.


 

2 REPLIES 2
AlB
Super User
Super User

Hi @PeterBlatchley 

1. What is the purpose of the bidirectional relationship? Should it not be unidirectional?

2. Why not have a separate dimension table with the names of  the pilots and copilots only? Which one is the fact table in this model?

 

Can you share the pbix by any chance? Beware of confidential data.

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

 

 

 

The bidirectional relationships is required so that I can create a table of crew flying time by choosing a pilot from the FlightLegCrew table and get all the flight legs that pilot has flown from the FlightDataAnalysis table. The FlightDataAnalysis table has two columns for crew, Pilot and CoPilot. The same crew member could be the pilot on one flight leg and a copilot on another so I cannot sum total flight time by just using the FlightDataAnalysis table. So in that sense, the FlightLegCrew table is the fact table. 

 

I am sorry, I am not allowed to share the pbix file.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.