<?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: Timestamps and 'trading' dates in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Timestamps-and-trading-dates/m-p/4732432#M181279</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1289632" target="_self"&gt;&lt;SPAN class=""&gt;Amylou12&lt;/SPAN&gt;&lt;/A&gt;,&lt;BR /&gt;&lt;BR /&gt;As per my understanding, I try to implement a solution for your problem as per the original post:&lt;BR /&gt;&lt;A href="https://cloudbiexpert-my.sharepoint.com/:u:/p/maruthi/EU9-dRUSSehFiKab1uHAXbwBT1armNWO3c7XndMcDz3YpA?e=tAspIF" target="_blank" rel="noopener"&gt;Timestamps and trading dates.pbix&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Please let me know if there is any missing things in the pbix file.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If this reply helped solve your problem, please consider clicking "Accept as Solution" so others can benefit too.&amp;nbsp;And if you found it useful, a quick "Kudos" is always appreciated, thanks!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maruthi&amp;nbsp;&lt;/P&gt;&lt;P&gt;LinkedIn -&amp;nbsp;&lt;A href="http://www.linkedin.com/in/maruthi-siva-prasad/" target="_blank" rel="nofollow noopener noreferrer"&gt;http://www.linkedin.com/in/maruthi-siva-prasad/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;X&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&lt;A href="https://x.com/maruthisp" target="_blank" rel="nofollow noopener noreferrer"&gt;Maruthi Siva Prasad - (@MaruthiSP) / X&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 15 Jun 2025 11:32:05 GMT</pubDate>
    <dc:creator>maruthisp</dc:creator>
    <dc:date>2025-06-15T11:32:05Z</dc:date>
    <item>
      <title>Timestamps and 'trading' dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Timestamps-and-trading-dates/m-p/4730923#M181219</link>
      <description>&lt;P&gt;I am wanting to group timestamped data into 15 minute intervals.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And also to reflect a 'trading' date that extends past midnight (ie trading date for 13 June is from "13062025 06:00 to 14062025 05:59"/ trading date for 14 June is "14062025 06:00 to 15062025 05:59" etc)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2025 04:45:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Timestamps-and-trading-dates/m-p/4730923#M181219</guid>
      <dc:creator>Amylou12</dc:creator>
      <dc:date>2025-06-13T04:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamps and 'trading' dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Timestamps-and-trading-dates/m-p/4731760#M181256</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1289632" data-lia-user-login="Amylou12" class="lia-mention lia-mention-user"&gt;Amylou12&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To group your timestamped data into 15-minute intervals and also assign a custom trading date that starts at 6:00 AM and runs until 5:59 AM the next day, you can handle this in either Power Query or DAX.&lt;/P&gt;
&lt;P&gt;In Power Query, you can create the 15-minute bucket by rounding down the minutes of your timestamp and creating a new datetime value that reflects the rounded time:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;= Table.AddColumn(Source, "15 Min Interval", each 
    #datetime(
        Date.Year([Timestamp]), 
        Date.Month([Timestamp]), 
        Date.Day([Timestamp]), 
        Time.Hour([Timestamp]), 
        Number.RoundDown(Time.Minute([Timestamp]) / 15) * 15, 
        0
    ))
&lt;/LI-CODE&gt;
&lt;P&gt;Then, to determine the trading date, which starts at 6:00 AM, you compare the time portion of your timestamp. If the time is before 6:00 AM, subtract one day from the date. Otherwise, use the current date:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;= Table.AddColumn(Source, "Trading Date", each 
    let ts = [Timestamp] in 
    if Time.From(ts) &amp;lt; #time(6,0,0) then Date.AddDays(Date.From(ts), -1) else Date.From(ts))
&lt;/LI-CODE&gt;
&lt;P&gt;If you're working in DAX and prefer calculated columns, the logic is similar. For the trading date:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Trading Date = 
VAR ts = 'YourTable'[Timestamp]
RETURN IF(
    TIME(HOUR(ts), MINUTE(ts), SECOND(ts)) &amp;lt; TIME(6,0,0),
    DATE(YEAR(ts), MONTH(ts), DAY(ts)) - 1,
    DATE(YEAR(ts), MONTH(ts), DAY(ts))
)
&lt;/LI-CODE&gt;
&lt;P&gt;And for the 15-minute interval rounding in DAX:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;15 Min Interval = 
VAR ts = 'YourTable'[Timestamp]
RETURN
    DATETIME(
        YEAR(ts), 
        MONTH(ts), 
        DAY(ts), 
        HOUR(ts), 
        INT(MINUTE(ts) / 15) * 15, 
        0
    )
&lt;/LI-CODE&gt;
&lt;P&gt;This will give you a clean and aligned way to analyze data based on trading hours that don’t follow the standard calendar day.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2025 15:26:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Timestamps-and-trading-dates/m-p/4731760#M181256</guid>
      <dc:creator>DataNinja777</dc:creator>
      <dc:date>2025-06-13T15:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamps and 'trading' dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Timestamps-and-trading-dates/m-p/4732432#M181279</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1289632" target="_self"&gt;&lt;SPAN class=""&gt;Amylou12&lt;/SPAN&gt;&lt;/A&gt;,&lt;BR /&gt;&lt;BR /&gt;As per my understanding, I try to implement a solution for your problem as per the original post:&lt;BR /&gt;&lt;A href="https://cloudbiexpert-my.sharepoint.com/:u:/p/maruthi/EU9-dRUSSehFiKab1uHAXbwBT1armNWO3c7XndMcDz3YpA?e=tAspIF" target="_blank" rel="noopener"&gt;Timestamps and trading dates.pbix&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Please let me know if there is any missing things in the pbix file.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If this reply helped solve your problem, please consider clicking "Accept as Solution" so others can benefit too.&amp;nbsp;And if you found it useful, a quick "Kudos" is always appreciated, thanks!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maruthi&amp;nbsp;&lt;/P&gt;&lt;P&gt;LinkedIn -&amp;nbsp;&lt;A href="http://www.linkedin.com/in/maruthi-siva-prasad/" target="_blank" rel="nofollow noopener noreferrer"&gt;http://www.linkedin.com/in/maruthi-siva-prasad/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;X&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&lt;A href="https://x.com/maruthisp" target="_blank" rel="nofollow noopener noreferrer"&gt;Maruthi Siva Prasad - (@MaruthiSP) / X&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Jun 2025 11:32:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Timestamps-and-trading-dates/m-p/4732432#M181279</guid>
      <dc:creator>maruthisp</dc:creator>
      <dc:date>2025-06-15T11:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamps and 'trading' dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Timestamps-and-trading-dates/m-p/4734213#M181341</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1289632" data-lia-user-login="Amylou12" class="lia-mention lia-mention-user"&gt;Amylou12&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Just wanted to check if you had the opportunity to review the suggestion provided by&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="526044" data-lia-user-login="maruthisp" class="lia-mention lia-mention-user"&gt;maruthisp&lt;/a&gt;&amp;nbsp; and&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="608865" data-lia-user-login="DataNinja777" class="lia-mention lia-mention-user"&gt;DataNinja777&lt;/a&gt;&amp;nbsp;.&lt;BR /&gt;&lt;BR /&gt;If the response has addressed your query, please "&lt;STRONG&gt;Accept it as a solution"&lt;/STRONG&gt;and give a &lt;STRONG&gt;'Kudos'&lt;/STRONG&gt; so other members can easily find it.&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;/P&gt;
&lt;P&gt;Tejaswi.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jun 2025 08:44:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Timestamps-and-trading-dates/m-p/4734213#M181341</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-06-20T08:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamps and 'trading' dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Timestamps-and-trading-dates/m-p/4738489#M181495</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1289632" data-lia-user-login="Amylou12" class="lia-mention lia-mention-user"&gt;Amylou12&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope the information provided has been useful. Please let me know if you need further clarification or would like to continue the discussion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your question has been answered, please &lt;STRONG&gt;“Accept as Solution”&lt;/STRONG&gt; and Give &lt;STRONG&gt;“Kudos”&lt;/STRONG&gt; so others with similar issues can easily find the resolution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;Tejaswi.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jun 2025 09:17:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Timestamps-and-trading-dates/m-p/4738489#M181495</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-06-20T09:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamps and 'trading' dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Timestamps-and-trading-dates/m-p/4740404#M181553</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1289632" data-lia-user-login="Amylou12" class="lia-mention lia-mention-user"&gt;Amylou12&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wanted to follow up and see if you had a chance to review the information shared. If you have any further questions or need additional assistance, feel free to reach out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the response answered your query, kindly&lt;STRONG&gt; “Accept as Solution”&lt;/STRONG&gt; and Give &lt;STRONG&gt;“Kudos”&lt;/STRONG&gt; to help others in the community benefit from it as well.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 08:50:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Timestamps-and-trading-dates/m-p/4740404#M181553</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-06-23T08:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamps and 'trading' dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Timestamps-and-trading-dates/m-p/4740432#M181558</link>
      <description>&lt;P&gt;Thank you, I haven't had a chance to e to revisit this as yet...when I do I will let you know how I go. Thx again&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 09:16:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Timestamps-and-trading-dates/m-p/4740432#M181558</guid>
      <dc:creator>AmylouWatts</dc:creator>
      <dc:date>2025-06-23T09:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamps and 'trading' dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Timestamps-and-trading-dates/m-p/4742043#M181605</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1293782" data-lia-user-login="AmylouWatts" class="lia-mention lia-mention-user"&gt;AmylouWatts&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No worries at all take your time. Once you’ve had a chance to review or try it out, just let me know how it goes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I’m here if you need any further help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jun 2025 09:12:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Timestamps-and-trading-dates/m-p/4742043#M181605</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-06-24T09:12:38Z</dc:date>
    </item>
  </channel>
</rss>

