Skip to main content
Microsoft Idea

Power BI

New

When assembling SQL statements in Power Query and connecting to I want to get a WHERE clause parameter from another data source.

Vote (13) Share
Yuho Iwasaki's profile image

Yuho Iwasaki on 30 Jun 2022 02:05:00

When assembling SQL statements in Power Query and connecting to

I want to get a WHERE clause parameter from another data source.


This does not occur if no parameter call is made and a fixed value is set.

The intention is to change the SQL flexibly on the Power BI side.


Comments (2)
Yuho Iwasaki's profile image Profile Picture

Andreu fil on 20 Apr 2024 02:24:11

RE: When assembling SQL statements in Power Query and connecting to I want to get a WHERE clause parameter from another data source.

Good information, thankssehackear.top

Yuho Iwasaki's profile image Profile Picture

Yuho Iwasaki on 30 Jun 2022 02:05:30

RE: When assembling SQL statements in Power Query and connecting to I want to get a WHERE clause parameter from another data source.

exsample:letsql1 ="SELECT Column1 FROM Northwind.dbo.test WHERE yyyymm = '__get_date__'",GetDate = PeriodMonth,sql2 = Text.Replace(sql1, "__get_date__", GetDate),Source = Sql.Database("TEST\SQLEXPRESS", "Northwind", [Query=sql2])in  Source