<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to use a custom SQL function in a DirectQuery/PowerQuery? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/How-to-use-a-custom-SQL-function-in-a-DirectQuery-PowerQuery/m-p/3422737#M44363</link>
    <description>&lt;P&gt;There are a few blog entries for that, for example&amp;nbsp;&amp;nbsp;&lt;A href="https://blog.crossjoin.co.uk/2022/02/20/tsql-table-valued-functions-and-dynamic-m-parameters-in-power-bi-directquery/" target="_blank"&gt;Chris Webb's BI Blog: TSQL Table-Valued Functions And Dynamic M Parameters In Power BI DirectQuery (crossjoin.co.uk)&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 10 Sep 2023 00:57:11 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2023-09-10T00:57:11Z</dc:date>
    <item>
      <title>How to use a custom SQL function in a DirectQuery/PowerQuery?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-use-a-custom-SQL-function-in-a-DirectQuery-PowerQuery/m-p/3420058#M44330</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In our Power BI dashboard, we want a simple visualization as explained below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The table consists of two columns: a date and the temprature that was measured on that date&lt;/P&gt;&lt;P&gt;A user has to select a time range, being a begin and end date. e.g. 01/01/2022 and 01/01/2023&lt;/P&gt;&lt;P&gt;Next we want to aggregate the temperatures within this range. We are talking about a custom aggregate function that is not one of the standard aggregation functions (like average, median). We want to do something more complex such as calculating the linear regression coefficients.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The function to calculate the linear regression coefficients has been implented by us in SQL and is registered in the underlying database. Eventually leading our query to be something like: SELECT linear_regression_coefs(temprature) in MyTable where date &amp;gt; start_date_param AND&amp;nbsp;date end_date_param&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, how am I able to implement this query and use my function in Power BI?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 16:20:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-use-a-custom-SQL-function-in-a-DirectQuery-PowerQuery/m-p/3420058#M44330</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-07T16:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a custom SQL function in a DirectQuery/PowerQuery?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-use-a-custom-SQL-function-in-a-DirectQuery-PowerQuery/m-p/3422737#M44363</link>
      <description>&lt;P&gt;There are a few blog entries for that, for example&amp;nbsp;&amp;nbsp;&lt;A href="https://blog.crossjoin.co.uk/2022/02/20/tsql-table-valued-functions-and-dynamic-m-parameters-in-power-bi-directquery/" target="_blank"&gt;Chris Webb's BI Blog: TSQL Table-Valued Functions And Dynamic M Parameters In Power BI DirectQuery (crossjoin.co.uk)&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Sep 2023 00:57:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-use-a-custom-SQL-function-in-a-DirectQuery-PowerQuery/m-p/3422737#M44363</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-09-10T00:57:11Z</dc:date>
    </item>
  </channel>
</rss>

