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

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

Reply
Anonymous
Not applicable

Filter SQL Based on Value from table

Hi

 

I have two tables. One has a field called "LastMonth", and the other needs to be filtered by this field.

Both tables are on different servers, and there no way I can load the second table full, because it is really big.

 

Is there any way I can set a parameter based on the value of the field of first table, toto filter the second table before being loaded?

Table 1 / Server 1:

LastMonth | ManyFields...

201910      | ....

201910      | ....

...

 

Table 2 / Server 2

Month  | Many Fields...

201910 | ...

201909 | ...

201908 | ...

I need to filter this table based on the value of LastMonth with a parameter. 

 

Thanks!!

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi @Anonymous 

You could use Parameters in Power BI

https://www.mssqltips.com/sqlservertip/4475/using-parameters-in-power-bi/

and then just selected LastMonth column of Table 1, and right-click it choose "Add as a New Query"

5.JPG

Now when you create a new parameter, please choose "Suggested Values"

6.JPG

 

Regards,

Lin

Community Support Team _ Lin
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

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi @Anonymous 

You could use Parameters in Power BI

https://www.mssqltips.com/sqlservertip/4475/using-parameters-in-power-bi/

and then just selected LastMonth column of Table 1, and right-click it choose "Add as a New Query"

5.JPG

Now when you create a new parameter, please choose "Suggested Values"

6.JPG

 

Regards,

Lin

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

Check this out...

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.