Forum Discussion
Can I query a Datasource based on an existing Dataset column?
Thanks for the reply v-diye-msft .
I am trying to query datasource but on the basis of another data set.
Suppose I am querying two dataset:
let
Source = Sql.Database("DatabaseEnpoint", "AnotherDBName", [Query="select RegionName, ID, Value from TableXY", MultiSubnetFailover=true]),
in
Source
Another Query:
let
Source = Sql.Database("DatabaseEnpoint", "DBName", [Query="MyQuery", MultiSubnetFailover=true]),
in
Source
Can I use in Myquery = "select * from Table where col1 in (RegionName From First Source(c.f. above))" ???
Hi sabeer6870 ,
do not use a SQL query, let Power Query create the query with query folding.
Use "Merge" to combine the two datasources with a inner join.
Power Query should create an appropriate query for data loading.
Regards,
Marcus
Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.
- sabeer68706 years agoMicrosoft Employee
Thanks for the reply mwegener .
I see you are merging two queries from existing two datasets but the issue is one of the dataset is too big that I cannot fetch it, hence merge won't work.
I am going to update the question with more accurate example please have a look. TIA.
- mwegener6 years agoMost Valuable Professional
Hi sabeer6870 ,
did you test my suggestion?
What error message do you get?
Regards,
Marcus
Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.- sabeer68706 years agoMicrosoft Employee
I cannot because i just have one data, the other one is too large to fetch.