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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
PioneerZhu
Microsoft Employee
Microsoft Employee

Data Match and Selection

Thank you upfront.

I have 2 tables already imported into PBI as below, wonder how to create a view to filter out records from Table 2 based on Table 1 that only with Direct Flight Avaliable? As a result, only the red line show up. 

 

Table 1:

Direct Flight List
FromTo
DallasNew York
AustinSeattle

 

Table 2:

Planned Trip List
NameMonthFromTo
TomFebHoustonNew York
FrankMarchDallasNew York
NateAugustAustinNew York
1 ACCEPTED SOLUTION
v-ssriganesh
Community Support
Community Support

Hi @PioneerZhu,
Thank you for reaching out to the Microsoft Fabric Forum Community and thank you, @kushanNa for sharing your valuable insights.

I have reproduced your scenario using the DAX code provided by @kushanNa. For your reference, I have attached the .pbix file.

If this helps, then please “Accept it as a solution” and dropping a "Kudos" so other members can find it more easily.
Hope this works for you!
Thanks.

View solution in original post

8 REPLIES 8
v-ssriganesh
Community Support
Community Support

Hi @PioneerZhu,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.

v-ssriganesh
Community Support
Community Support

Hi @PioneerZhu,

May I ask if you have resolved this issue? If so, please mark it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

v-ssriganesh
Community Support
Community Support

Hi @PioneerZhu,
Thank you for reaching out to the Microsoft Fabric Forum Community and thank you, @kushanNa for sharing your valuable insights.

I have reproduced your scenario using the DAX code provided by @kushanNa. For your reference, I have attached the .pbix file.

If this helps, then please “Accept it as a solution” and dropping a "Kudos" so other members can find it more easily.
Hope this works for you!
Thanks.

Hi @PioneerZhu,
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please accept it as a solution and give it a 'Kudos' so other community members with similar problems can find a solution faster.
Thank you.

kushanNa
Super User
Super User

Hi @PioneerZhu 

 

If you want to do this from Dax side please follow the following steps 

 

click on modeling new table 

 

kushanNa_0-1743045878969.png

 

copy and past the following code to create a Dax calculated table

 

FilteredTrips = 
FILTER(
    'Planned Trip List',
    LOOKUPVALUE(
        'Direct Flight List'[To], 
        'Direct Flight List'[From], 'Planned Trip List'[From], 
        'Direct Flight List'[To], 'Planned Trip List'[To]
    ) <> BLANK()
)

 

you can see the table on the Table view 

 

kushanNa_1-1743046051831.png

 

Ashish_Mathur
Super User
Super User

Hi,

In Power Query, you can merge table 1 into table 2 based on 2 columns - From and To.  Thereafter just apply a filter.


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

Add a table visual with table 2 fields. Then add the following measure to the filter pane and filter not is blank.

 

var trip = SUMMARIZE( table2, table2[from], table2[to] )
var matchingFlight =
   CALCULATETABLE(
      table1,
      TREATAS( trip, table1[from], table2[to] )
   )
return
IF( NOT ISEMPTY( matchingFlight ), 1 )

Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
PioneerZhu
Microsoft Employee
Microsoft Employee

Thank you but I didn't get it "Then add the following measure to the filter pane and filter not is blank." how to do this?

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.