Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

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

 

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 .
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

  • 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