Forum Discussion
CLR type
- 3 years ago
Most connectors for SQL style databases allow you to specify a "native query" when you create the connection.
For SQL Server the field is "SQL Statement".
Alternatively you can implement your SQL logic in a view at the data source, and then in Power BI you can consume the view as if it were a table.
Instead of consuming the table can you run a SQL query that casts the values in a more agreeable format?
Hi,
in power query?? how to do?
- lbendlin3 years agoSuper User
Show your current code (sanitized)
- Elage373 years agoFrequent Visitor
let
Source = OleDb.DataSource("provider=PCSoft.HFSQL;initial catalog=IBP_DATA;data source=192.168.50.22"),
IBP_DATA_Database = Source{[Name="IBP_DATA",Kind="Database"]}[Data],
POINTAGE_Table = IBP_DATA_Database{[Name="POINTAGE",Kind="Table"]}[Data]
in
POINTAGE_Table- lbendlin3 years agoSuper User
In the connection settings you can already specify a custom query.