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

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

Reply
Anonymous
Not applicable

filter out data based on one to one relationship

create table g_emp(empid number,ename varchar2(100));

insert into g_emp values(1,'emp1');
insert into g_emp values(2,'emp2');

create table g_emp_comp (empid number, ename varchar2(100), boss varchar2(100));

insert into g_emp_comp values(1,'emp1','emp1_boss');
insert into g_emp_comp values(2,'emp2','emp2_boss');
insert into g_emp_comp values(3,'emp3','emp3_boss');

commit;

 

when you create a power bi report with above 2 tables, we have a one to one created automatically based on empid

Question: when i use the boss column from g_emp_comp as a slicer, I don't want to see emp3_boss, because there is no emp3 record in the first table g_emp , how do i do that ?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Please new a measure.

Measure = 
VAR _ename = MAX('g_emp'[ename])
RETURN
IF(_ename<>BLANK(),1)

Then select the slicer, apply this measure to the filter of this view, and set it as shown in the figure.

vcgaomsft_0-1653365977786.png

Attached PBIX file for reference.

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @Anonymous ,

 

Please new a measure.

Measure = 
VAR _ename = MAX('g_emp'[ename])
RETURN
IF(_ename<>BLANK(),1)

Then select the slicer, apply this measure to the filter of this view, and set it as shown in the figure.

vcgaomsft_0-1653365977786.png

Attached PBIX file for reference.

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

Anonymous
Not applicable

This is strange, my end user thinks one to one relationship is like an oracle inner join

 

I never thought about it in this way but is there a dax that I can use to create a new table and get only the data that matches, ( only have emp1_boss and emp2_boss as rows in the new table)

johnt75
Super User
Super User

create a visual level filter on either of the columns from g_emp and set it to be "not blank".

Anonymous
Not applicable

tried the below, not working

 

Powerbi_astra_0-1652982888475.png

 

Anonymous
Not applicable

does not help,

 

Powerbi_astra_0-1652977572872.png

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors