<?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 Replace Time of specific Datetime in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Replace-Time-of-specific-Datetime/m-p/793082#M4609</link>
    <description>&lt;P&gt;Hi at all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have a table with a column named start that represents a Datetime. Format -&amp;gt; 01.07.2019 05:50:00&lt;/P&gt;&lt;P&gt;I also have a Slicer where i can select a timespan. In this case from 6am to 2pm.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Now when start is less than 6 i want to replace the time 05:50:00 with 06:00:00.&lt;/P&gt;&lt;P&gt;Start should look like 01.07.2019 06:00:00 now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be nice if someone can help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gresi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Sep 2019 09:04:29 GMT</pubDate>
    <dc:creator>Gresi</dc:creator>
    <dc:date>2019-09-16T09:04:29Z</dc:date>
    <item>
      <title>Replace Time of specific Datetime</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Replace-Time-of-specific-Datetime/m-p/793082#M4609</link>
      <description>&lt;P&gt;Hi at all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have a table with a column named start that represents a Datetime. Format -&amp;gt; 01.07.2019 05:50:00&lt;/P&gt;&lt;P&gt;I also have a Slicer where i can select a timespan. In this case from 6am to 2pm.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Now when start is less than 6 i want to replace the time 05:50:00 with 06:00:00.&lt;/P&gt;&lt;P&gt;Start should look like 01.07.2019 06:00:00 now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be nice if someone can help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gresi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 09:04:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Replace-Time-of-specific-Datetime/m-p/793082#M4609</guid>
      <dc:creator>Gresi</dc:creator>
      <dc:date>2019-09-16T09:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: Replace Time of specific Datetime</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Replace-Time-of-specific-Datetime/m-p/793199#M4612</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should first extract the time from the Datetime Value. For doing this Select the column -&amp;gt; Go to Modelling -&amp;gt; Change Datetime format (HH:MMS). This would show the Column as Time Value. Now, Create a new column with the below formula&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once Done, Go to Modelling and change the Format back to Datetime (DD/MM/YYYY HH:MMS) as the Output Datatype from the above would be of type Text.&lt;/P&gt;&lt;PRE&gt;New_Column:= Date(Year(Date), Month(Date), Day(Date)) &amp;amp;IF(HOUR(Date[Time])&amp;lt; 6, "06:00:00",Date[Time]))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 11:10:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Replace-Time-of-specific-Datetime/m-p/793199#M4612</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-16T11:10:22Z</dc:date>
    </item>
  </channel>
</rss>

