<?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: Using Date as VAR and Parameter Advanced Editor in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Using-Date-as-VAR-and-Parameter-Advanced-Editor/m-p/2329443#M22850</link>
    <description>&lt;P&gt;Yeah I guess it is a date format issue then.&lt;/P&gt;&lt;P&gt;I believe it's only the EndDate giving me an error.&lt;/P&gt;&lt;P&gt;I got the following for the EndofPeriod&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Source = if EndOfPeriod = null then Date.AddDays(Date.EndOfDay(DateTime.LocalNow()),-1) else EndOfPeriod&lt;BR /&gt;&amp;nbsp;the above gives me a format of&amp;nbsp;2022-02-09T23:59:59.9999999, how can I change it to&amp;nbsp;&lt;SPAN&gt;1/01/2022 12:00:00 PM format?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Feb 2022 00:41:15 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-02-10T00:41:15Z</dc:date>
    <item>
      <title>Using Date as VAR and Parameter Advanced Editor</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Using-Date-as-VAR-and-Parameter-Advanced-Editor/m-p/2327151#M22838</link>
      <description>&lt;P&gt;Hi, I am trying to use the Var I have set for Startdate and Endate to set the parameter for my dataset from Parquet.&lt;/P&gt;&lt;P&gt;The value for StartofPeriodx =&amp;nbsp;1/01/2022 12:00:00 PM&lt;/P&gt;&lt;P&gt;The value for EndofPeriodx =&amp;nbsp;2022-02-08T23:59:59.9999999&lt;/P&gt;&lt;P&gt;I have currently used manual dates, how do I set the [Notification Date] &amp;gt;=StartDate and&amp;nbsp;[Notification Date] &amp;lt;=EndDate&lt;/P&gt;&lt;P&gt;The start of my code is as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;Let&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;StartDate = StartOfPeriodx,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;EndDate = EndOfPeriodx,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;Source = Parquet.Document(File.Contents("\\notifs.pq")),&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;#"Filtered Rows" = Table.SelectRows(#"Renamed Columns", each [Notification date] &amp;gt;= #datetime(2022, 1, 1, 0, 0, 0) and [Notification date] &amp;lt;= #datetime(2022, 2, 2, 0, 0, 0))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 04:47:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Using-Date-as-VAR-and-Parameter-Advanced-Editor/m-p/2327151#M22838</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-09T04:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Using Date as VAR and Parameter Advanced Editor</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Using-Date-as-VAR-and-Parameter-Advanced-Editor/m-p/2329374#M22848</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have currently used manual dates, how do I set the [Notification Date] &amp;gt;=StartDate and&amp;nbsp;[Notification Date] &amp;lt;=EndDate&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;As long as the variables are the same data type if should work exactly as you have it in your psuedo code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;eg.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Let

StartDate = StartOfPeriodx,
EndDate = EndOfPeriodx,
Source = Parquet.Document(File.Contents("\\notifs.pq")),
#"Filtered Rows" = Table.SelectRows(#"Renamed Columns", each [Notification date] &amp;gt;= StartDate and [Notification date] &amp;lt;= EndDate)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 23:11:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Using-Date-as-VAR-and-Parameter-Advanced-Editor/m-p/2329374#M22848</guid>
      <dc:creator>d_gosbell</dc:creator>
      <dc:date>2022-02-09T23:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using Date as VAR and Parameter Advanced Editor</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Using-Date-as-VAR-and-Parameter-Advanced-Editor/m-p/2329443#M22850</link>
      <description>&lt;P&gt;Yeah I guess it is a date format issue then.&lt;/P&gt;&lt;P&gt;I believe it's only the EndDate giving me an error.&lt;/P&gt;&lt;P&gt;I got the following for the EndofPeriod&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Source = if EndOfPeriod = null then Date.AddDays(Date.EndOfDay(DateTime.LocalNow()),-1) else EndOfPeriod&lt;BR /&gt;&amp;nbsp;the above gives me a format of&amp;nbsp;2022-02-09T23:59:59.9999999, how can I change it to&amp;nbsp;&lt;SPAN&gt;1/01/2022 12:00:00 PM format?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 00:41:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Using-Date-as-VAR-and-Parameter-Advanced-Editor/m-p/2329443#M22850</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-10T00:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: Using Date as VAR and Parameter Advanced Editor</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Using-Date-as-VAR-and-Parameter-Advanced-Editor/m-p/2329635#M22855</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Yeah I guess it is a date format issue then.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;No, I was talking about Data Types (eg. Date vs DateTime vs DateTimeOffset), but it looks like you are using a DateTime here so that is probably not the issue. (although DateTime.LocalNow could be a problem depending on where you run your data refresh from. If you refresh on the Power BI Service the Date Time will be in UTC time, if you refresh on a Report Server the time will depend on the timezone setting on the server)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I believe it's only the EndDate giving me an error.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is the first time you've mentioned seeing an error. What is the text of the error message?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 02:53:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Using-Date-as-VAR-and-Parameter-Advanced-Editor/m-p/2329635#M22855</guid>
      <dc:creator>d_gosbell</dc:creator>
      <dc:date>2022-02-10T02:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using Date as VAR and Parameter Advanced Editor</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Using-Date-as-VAR-and-Parameter-Advanced-Editor/m-p/2332063#M22877</link>
      <description>&lt;P&gt;Cheers mate, The previous way worked. It kept getting timed out as the date range was over a year.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 02:04:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Using-Date-as-VAR-and-Parameter-Advanced-Editor/m-p/2332063#M22877</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-11T02:04:26Z</dc:date>
    </item>
  </channel>
</rss>

