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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
crispybits77
Helper I
Helper I

Limiting table visual to records in a single source

I have a table visual that draws from two different source data tables. For simplicity with an example the source tables look like this:

 

Source1:Emp IDNameSource2:EmpIDName of Pet
 1Steve 1Spot
 2Bob 2Fido
 3Jane 2Max
 4Laura 5Boots
 5Sam 5Scruff

 

I want the table to show all the records with a pet from the second source table, but also pull in the name from the first source table. What I actually get is this:

Emp IDNameName of Pet
1SteveSpot
2BobFido
2BobMax
3Jane 
4Laura 
5SamBoots
5SamScruff

 

I've tried putting a filter on the visual to not show records where Name of Pet is blank or empty, but that appears to be filtering only based on the second source table, it doesn't remove the records that don't exist in that table at all from the visual.

 

Probably missing something obvious but is there any way to not show Jane and Laura in this case, and only show the other 3?

1 ACCEPTED SOLUTION

Hi, @crispybits77 

Thank you very much for your reply. I think you can try him. Additionally, you can create a relationship for two tables and put one of the ID columns into table visual to get a similar effect:

hackcrr_0-1715604428688.png

hackcrr_1-1715604451819.png

I prefer to build relationships, which will optimize performance.

 

 

Best Regards,

hackcrr

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

4 REPLIES 4
v-jianpeng-msft
Community Support
Community Support

Your solutions is great @hackcrr   
Hi, @crispybits77 

 Have you solved your problem? If so, can you mark the correct answer as a standard answer to help other members find it faster. Thank you very much for your kind cooperation!

 

 

How to Get Your Question Answered Quickly

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Jianpeng Li

crispybits77
Helper I
Helper I

Thanks @hackcrr 

Is there much performance penalty for this? In the real world scenario my tables both have 10,000s of rows.

Hi, @crispybits77 

Thank you very much for your reply. I think you can try him. Additionally, you can create a relationship for two tables and put one of the ID columns into table visual to get a similar effect:

hackcrr_0-1715604428688.png

hackcrr_1-1715604451819.png

I prefer to build relationships, which will optimize performance.

 

 

Best Regards,

hackcrr

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

hackcrr
Solution Supplier
Solution Supplier

Hi, @crispybits77 

Based on your description, you could create a new Calculated Table or Calculated Column, use DAX to merge the two tables, and make sure to select only those EmpIDs that exist in both tables.

Here are the two source tables I used:

hackcrr_0-1715602789011.png

hackcrr_1-1715602800713.png

I created a calculation table using the following DAX expression:

Merged Table = 
FILTER(  
    NATURALLEFTOUTERJOIN('Table', 'Table1'),  
    NOT ISBLANK('Table'[Name of Pet])  
)

hackcrr_2-1715602869812.png

Use this new Merged Table in the table visual object:

hackcrr_3-1715602941939.png

 

 

 

Best Regards,

hackcrr

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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