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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Marico
Helper IV
Helper IV

Native Query

Can anyone help to write the Native Query for the following power query? Source is snowflake - I just need help with the SQL inside the native query.

 

let
Source=SF_Connect,
GetData = Source{[Name="V1",Kind="View"]}[Data],
#"Filtered Rows" = if #Sample = "Y" then Table.SelectRows(GetData", each ([Cluster] = #"Sample Cluster")) else Table.SelectRows(GetData, each List.Contains(#"LiveMarketGroups",[Market Group C]) and [Cluster] <> "Unknown")
in
#"Filtered Rows"

 

@Greg_Deckler @amitchandak

2 REPLIES 2
Marico
Helper IV
Helper IV

@amitchandak Can you please help with the code for above? Specially, how to add multiple parameters and subqueries in the where condition as it is above.

amitchandak
Super User
Super User

@Marico , After July 2021, We have the option to write the query in the advance option of connection, you should use that

 

As the query is a string, you can break a string add a parameter

 

"select * from table where date ='" & startDate &"' "

 

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.