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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.