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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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