The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Dear Community,
Is it possible to pass the value from one query to another query's where condition?
From query 1 values must be dynamic in query 2 where condition.
For example:
query1- select * from table1
query2- select * from table2 where id = table1.id AND orgid = table1.orgid
Thanks in advance
Solved! Go to Solution.
Hi @Charu ,
You can refer to this case and a document in it. You can treat QUERY 1 as a parameter.
Best Regards,
Eads
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Charu ,
When you are ready to connect to database, you can click the Advanced options.
Then use the following query in the SQL statement.
select b.* from table1 a,table2 b where a.id=b.id and a.orgid=b.orgid
You can get result you want.
Best Regards,
Eads
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
query 1 and query 2 - I will connect both as different datasource.
That is first i will connect query1 and then I will connect query 2.So I don't think I can write a sql statement combining it.
Hi @Charu ,
You can refer to this case and a document in it. You can treat QUERY 1 as a parameter.
Best Regards,
Eads
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.