<?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: Help with code to pass parameter in report in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Help-with-code-to-pass-parameter-in-report/m-p/2338590#M34404</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/288471"&gt;@danielcarreira1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please update the applied codes in your Advanced Editor as below, the part with red font is updated one. Please note that the &lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;Date &lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#000000"&gt;with&lt;/FONT&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;blue font &lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#000000"&gt;is date parameter name....&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&lt;STRONG&gt;let&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&lt;STRONG&gt;Source = Sql.Database("sap", "entie", [Query="&lt;FONT size="3" color="#FF0000"&gt;exec [1test] &amp;nbsp;'"&amp;amp; Date.ToText(&lt;FONT color="#0000FF"&gt;Date&lt;FONT color="#FF0000"&gt;) &amp;amp; "' #(lf)#(lf)#(lf) #(lf)&lt;/FONT&gt; &lt;FONT color="#000000"&gt;&lt;SPAN class=""&gt;"&lt;SPAN&gt;]) ,&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&lt;STRONG&gt;#"Extracted Date" = Table.TransformColumns(Source,{{"Date", DateTime.Date, type date}}),&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&lt;STRONG&gt;#"Pivoted Column" = Table.Pivot(Table.TransformColumnTypes(#"Extracted Date", {{"Date", type text}}, "en-GB"), List.Distinct(Table.TransformColumnTypes(#"Extracted Date", {{"Date", type text}}, "en-GB")[Date]), "Date", "Balance", List.Sum)&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&lt;STRONG&gt;in&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&lt;STRONG&gt;#"Pivoted Column"&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;In addition, you can also refer the following links to update the codes...&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.c-sharpcorner.com/article/execute-sql-server-stored-procedure-with-user-parameter-in-power-bi/" target="_self"&gt;Execute SQL Server Stored Procedure With User Parameter In Power BI&lt;/A&gt;&lt;/P&gt;
&lt;DIV class=""&gt;&lt;A href="https://community.powerbi.com/t5/Power-Query/parameters-to-SP-or-Sql-query/td-p/57734" target="_self"&gt;parameters to SP or Sql query&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yingyinr_0-1644902996079.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/669891i3CEF6362020C0BA6/image-size/large?v=v2&amp;amp;px=999" role="button" title="yingyinr_0-1644902996079.png" alt="yingyinr_0-1644902996079.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
    <pubDate>Tue, 15 Feb 2022 05:35:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-02-15T05:35:42Z</dc:date>
    <item>
      <title>Help with code to pass parameter in report</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Help-with-code-to-pass-parameter-in-report/m-p/2333870#M34350</link>
      <description>&lt;P&gt;Hi all,I have made a date parameter for a t-sql stored procedure and tried to insert the name of the parameter on the code, but it doesn't work, see below code from advanced editor and also the error message, appreciate if someone can tell me what i am doing wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    Source = Sql.Database("sap", "entie", [Query="execute [1test] "&amp;amp;Date]),
    #"Extracted Date" = Table.TransformColumns(Source,{{"Date", DateTime.Date, type date}}),
    #"Pivoted Column" = Table.Pivot(Table.TransformColumnTypes(#"Extracted Date", {{"Date", type text}}, "en-GB"), List.Distinct(Table.TransformColumnTypes(#"Extracted Date", {{"Date", type text}}, "en-GB")[Date]), "Date", "Balance", List.Sum)
in
    #"Pivoted Column"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ERROR MESSAGE:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Expression.Error: We cannot apply operator &amp;amp; to types Text and Date.&lt;BR /&gt;Details:&lt;BR /&gt;Operator=&amp;amp;&lt;BR /&gt;Left=execute [1test]&lt;BR /&gt;Right=01/01/2020&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 16:07:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Help-with-code-to-pass-parameter-in-report/m-p/2333870#M34350</guid>
      <dc:creator>danielcarreira1</dc:creator>
      <dc:date>2022-02-11T16:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: Help with code to pass parameter in report</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Help-with-code-to-pass-parameter-in-report/m-p/2335093#M34364</link>
      <description>&lt;LI-CODE lang="markup"&gt;[Query="execute [1test] " &amp;amp; Text.From(Date)]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But you likely still won't be able to run that. What date format is the SP expecting?&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 03:42:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Help-with-code-to-pass-parameter-in-report/m-p/2335093#M34364</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-02-13T03:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Help with code to pass parameter in report</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Help-with-code-to-pass-parameter-in-report/m-p/2336441#M34382</link>
      <description>&lt;P&gt;Hi Ibendlin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It didn't worked, the SP is expecting a date format&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 09:28:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Help-with-code-to-pass-parameter-in-report/m-p/2336441#M34382</guid>
      <dc:creator>danielcarreira1</dc:creator>
      <dc:date>2022-02-14T09:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: Help with code to pass parameter in report</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Help-with-code-to-pass-parameter-in-report/m-p/2337438#M34395</link>
      <description>&lt;P&gt;which exact data format ? yyyy-MM-dd&amp;nbsp; ?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 16:09:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Help-with-code-to-pass-parameter-in-report/m-p/2337438#M34395</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-02-14T16:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: Help with code to pass parameter in report</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Help-with-code-to-pass-parameter-in-report/m-p/2338590#M34404</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/288471"&gt;@danielcarreira1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please update the applied codes in your Advanced Editor as below, the part with red font is updated one. Please note that the &lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;Date &lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#000000"&gt;with&lt;/FONT&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;blue font &lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#000000"&gt;is date parameter name....&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&lt;STRONG&gt;let&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&lt;STRONG&gt;Source = Sql.Database("sap", "entie", [Query="&lt;FONT size="3" color="#FF0000"&gt;exec [1test] &amp;nbsp;'"&amp;amp; Date.ToText(&lt;FONT color="#0000FF"&gt;Date&lt;FONT color="#FF0000"&gt;) &amp;amp; "' #(lf)#(lf)#(lf) #(lf)&lt;/FONT&gt; &lt;FONT color="#000000"&gt;&lt;SPAN class=""&gt;"&lt;SPAN&gt;]) ,&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&lt;STRONG&gt;#"Extracted Date" = Table.TransformColumns(Source,{{"Date", DateTime.Date, type date}}),&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&lt;STRONG&gt;#"Pivoted Column" = Table.Pivot(Table.TransformColumnTypes(#"Extracted Date", {{"Date", type text}}, "en-GB"), List.Distinct(Table.TransformColumnTypes(#"Extracted Date", {{"Date", type text}}, "en-GB")[Date]), "Date", "Balance", List.Sum)&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&lt;STRONG&gt;in&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&lt;STRONG&gt;#"Pivoted Column"&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;In addition, you can also refer the following links to update the codes...&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.c-sharpcorner.com/article/execute-sql-server-stored-procedure-with-user-parameter-in-power-bi/" target="_self"&gt;Execute SQL Server Stored Procedure With User Parameter In Power BI&lt;/A&gt;&lt;/P&gt;
&lt;DIV class=""&gt;&lt;A href="https://community.powerbi.com/t5/Power-Query/parameters-to-SP-or-Sql-query/td-p/57734" target="_self"&gt;parameters to SP or Sql query&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yingyinr_0-1644902996079.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/669891i3CEF6362020C0BA6/image-size/large?v=v2&amp;amp;px=999" role="button" title="yingyinr_0-1644902996079.png" alt="yingyinr_0-1644902996079.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2022 05:35:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Help-with-code-to-pass-parameter-in-report/m-p/2338590#M34404</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-15T05:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help with code to pass parameter in report</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Help-with-code-to-pass-parameter-in-report/m-p/2339359#M34409</link>
      <description>&lt;P&gt;Hi Ibendlin,&lt;/P&gt;&lt;P&gt;The date format is dd/mm/yyyy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2022 10:23:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Help-with-code-to-pass-parameter-in-report/m-p/2339359#M34409</guid>
      <dc:creator>danielcarreira1</dc:creator>
      <dc:date>2022-02-15T10:23:13Z</dc:date>
    </item>
  </channel>
</rss>

