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

Regarding the query generation within the query

Hi Team,

I am facing a issue regarding filtering the data at power bi level.

Explanation:

 

My Backend database team has provided a query which is inturn generating a query as a table as  shown in the pic db1 attcahed

db1.PNG

 

And im getting the data from snowflake server, 
Now the issue is i want to filter based upon coloumn 1 and coloumn 2 which gives  a select query which is in 3 rd coloumn , and it  should be the base query for my report ,  for ex see the pic below when i filter using col 1 nad col2 the 3 col is showing a statement .db2.PNG
Now i want to use the select statemnet query which is in 3 rd coloumn as a base query to generate the dataset .
can some one help on this.

 

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , based on what got.

Create a new connection with SQL  in advance option

 

Copy the code from advanced editor

Paste that code after this step 

Replace the sql with List.Max(#"Last step Table Name"[Col3]) 

and then return the last step of copied query using "In"

 

This will give an idea of how to use

Merge Queries, Why not Merge the code: https://youtu.be/YOFs39RCPfQ

 

Change Connection from One source type to another Source Type: https://youtu.be/nwYJgG2hmd0

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.