<?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 Create Date Parameters in Direct query in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/How-to-Create-Date-Parameters-in-Direct-query/m-p/782540#M20607</link>
    <description>&lt;P&gt;Hi Jayendran,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your reply on this...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I Have created parameters as showed in your video it is working in Power Bi desktop. However, when i go to Dataset&amp;nbsp; -- Settings -- Parameters. Over there in StartDate and EndDate i have give date range. As per the given date range data is not populating in power bi service. My i know the reason... In Desktop it is working fine but when comes to PBI Services why data is not populating as per given range....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please clarify..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in adavance.&lt;/P&gt;&lt;P&gt;RAVIP&lt;/P&gt;</description>
    <pubDate>Tue, 03 Sep 2019 16:10:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-09-03T16:10:11Z</dc:date>
    <item>
      <title>How to Create Date Parameters in Direct query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-Create-Date-Parameters-in-Direct-query/m-p/778159#M20552</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm want to restrict the data to the users. So, i have created a Date parameter wherein user have to select Start date and End Date in Power bi service.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created below M Langauage and pasted in Advance Editor&lt;BR /&gt;Next I have Created two Parameters Param1 and Param2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let&lt;BR /&gt;SQLSOURCE=(Param1 as date, Param2 as date)=&amp;gt;&lt;BR /&gt;let&lt;BR /&gt;Param1=Date.ToText(Param1,"MM")&amp;amp;"/"&amp;amp;Date.ToText(Param1,"dd")&amp;amp;"/"&amp;amp;Date.ToText(Param1,"yyyy"),&lt;BR /&gt;Param2=Date.ToText(Param2,"MM")&amp;amp;"/"&amp;amp;Date.ToText(Param2,"dd")&amp;amp;"/"&amp;amp;Date.ToText(Param2,"yyyy"),&lt;BR /&gt;Source=Sql.Database("sqllink","Database",&lt;BR /&gt;[Query="Select Column1,Column1,Date_Txt from (SELECT Column1,Column2,LEFT(CONVERT(VARCHAR,&amp;nbsp;Date_N,&amp;nbsp;120),&amp;nbsp;10) as Date_Txt FROM dbo.Transform )a&lt;BR /&gt;where Date_Txt &amp;gt;='"&amp;amp;Param1&amp;amp;"' AND Date_Txt &amp;lt;='"&amp;amp;Param2 &amp;amp; "'"])&lt;BR /&gt;in&lt;BR /&gt;Source&lt;BR /&gt;in&lt;BR /&gt;SQLSOURCE&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;When i run the query i am not getting any results.&lt;/P&gt;&lt;P&gt;Please guide me how to create parameters in date level and add in power bi dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;BR /&gt;Ravi&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 17:18:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-Create-Date-Parameters-in-Direct-query/m-p/778159#M20552</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-28T17:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to Create Date Parameters in Direct query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-Create-Date-Parameters-in-Direct-query/m-p/779959#M20568</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically it should work. Do you have tried this with the latest PBI Desktop ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the real working sample video :&amp;nbsp;&lt;A href="https://channel9.msdn.com/Blogs/MVP-Azure/Pass-parameter-to-SQL-Queries-statement-using-Power-BI" target="_blank"&gt;https://channel9.msdn.com/Blogs/MVP-Azure/Pass-parameter-to-SQL-Queries-statement-using-Power-BI&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2019 07:28:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-Create-Date-Parameters-in-Direct-query/m-p/779959#M20568</guid>
      <dc:creator>Jayendran</dc:creator>
      <dc:date>2019-08-30T07:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to Create Date Parameters in Direct query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-Create-Date-Parameters-in-Direct-query/m-p/782540#M20607</link>
      <description>&lt;P&gt;Hi Jayendran,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your reply on this...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I Have created parameters as showed in your video it is working in Power Bi desktop. However, when i go to Dataset&amp;nbsp; -- Settings -- Parameters. Over there in StartDate and EndDate i have give date range. As per the given date range data is not populating in power bi service. My i know the reason... In Desktop it is working fine but when comes to PBI Services why data is not populating as per given range....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please clarify..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in adavance.&lt;/P&gt;&lt;P&gt;RAVIP&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 16:10:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-Create-Date-Parameters-in-Direct-query/m-p/782540#M20607</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-03T16:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to Create Date Parameters in Direct query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-Create-Date-Parameters-in-Direct-query/m-p/2865622#M39439</link>
      <description>&lt;P&gt;I passed the exact syntax to my SQL query for the data parameter, '"StartTime"' and I received a token Comma&amp;nbsp; syntax error in the Advanced Editor.&amp;nbsp; Both the Parameters are Date data types.&amp;nbsp; Any ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 17:20:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-Create-Date-Parameters-in-Direct-query/m-p/2865622#M39439</guid>
      <dc:creator>FarmerKenny</dc:creator>
      <dc:date>2022-10-26T17:20:56Z</dc:date>
    </item>
  </channel>
</rss>

