cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BIstudent
New Member

Creating a Measure Using Two Tables and a Filter

Hello,

I recently started using Power BI and I am having trouble getting the result I want.

 

My Data:

I have a dimension table containing information about airports, like name and location.  I also have a fact table containing flights per month per year, for each airport.  A diagram of the tables is below.

Capture.PNG

 

My Problem:

I want to calculate what percentage of a region’s flights occur at each airport in that region per month per year.  Ultimately, I want to place this calculation in a chart.

 

I have been able to create a measure that calculates the percent of national flights that occurred in a region but haven’t been able to apply this to the airports within the region.

 

AtlanticFlights = CALCULATE(SUM(fFlights1[Flights]),Airports3[Region] = "Atlantic")

 

Any help would be very appreciated.

 

Thanks in advance.

2 REPLIES 2
v-joesh-msft
Solution Sage
Solution Sage

Hi @BIstudent ,

I'm a little confused by your description. Sample data and expected output would help tremendously. Please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

Best Regards,
Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Ashish_Mathur
Super User
Super User

Hi,

Share some data and show the expected result in a Table format.  Do not bother about the final desired chart right now.  First let's get the correct result in a Table.  We can thereafter always switch the visual to any chart.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!