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
cmpbn
New Member

Filter columns from two or more tables

I have two tables Employee and Department, and the common column is deptno.
I have been trying to calculate the number of employees from deptno 20 whose earns more than 550.
I palyed with the FILTER function, but its not letting me filter columns from two different tables

 

EMPNODEPTNOSAL

SZ190

10459
SZ18120600
SZ87620587
SZ56820545
SZ73230390


Department Table

DEPTNOCITY
10LA
20CHICAGO
30JACKSONVILLE


Thanks,
Nawaz

1 ACCEPTED SOLUTION
NaveenGandhi
Super User
Super User

@cmpbn 

Create a lookup column and use it to filter EMP table. I have updated the PBIX with altered solution.

Does this help?

If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!

Follow me on LinkedIn!!!


View solution in original post

6 REPLIES 6
NaveenGandhi
Super User
Super User

@cmpbn 

Create a lookup column and use it to filter EMP table. I have updated the PBIX with altered solution.

Does this help?

If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!

Follow me on LinkedIn!!!


Instead of manually passing city = chicago and sal > 500.
is there a way to to parameterized the hard coded values?

@cmpbn 

For City you can use a slicer of city name[create a city  dim table and keep this disconnected], For salary create a numeric parameter. Use selectedvalue function to pass both of these to the measure. It will look something like below.

calculate(count(emp),city=selected value of(city_fromdim table)&&salary>selectedvalue(numeric_parameter))

Thanks, it worked.
I just realised this could have been done using CALCULATE function which reestablishes the relation ship between the tables.

NaveenGandhi
Super User
Super User

hi @cmpbn 

Below file has 2 variations of solutions, Let me know if this is what your are expecting. Else share sample output.

If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!

Follow me on LinkedIn!!!

Thanks for the reply,  I miss typed my previous question.
I wanted to find out the number of employees from CHICAGO area who earns more than 550

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!

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