<?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: Create shift from time in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-shift-from-time/m-p/3182256#M115077</link>
    <description>&lt;P&gt;Thanks a lot! That worked and you help me a lot to understand how it works!&lt;/P&gt;</description>
    <pubDate>Tue, 11 Apr 2023 16:25:51 GMT</pubDate>
    <dc:creator>ReyDeSirenas</dc:creator>
    <dc:date>2023-04-11T16:25:51Z</dc:date>
    <item>
      <title>Create shift from time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-shift-from-time/m-p/3180547#M114974</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I´ve been trying to figure this out. So basically I want to create a new table named "Shift" with only two values: Shift 1 and Shift 2.&lt;/P&gt;&lt;P&gt;Shift 1 goes from 07:30 to 19:30 and Shift 2 goes from 19:30 to 07:30. These shifts are for all days of the week.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Days of the week are seen as numbers, not text. This is how it looks:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you guys have any idea how to do it?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 21:47:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-shift-from-time/m-p/3180547#M114974</guid>
      <dc:creator>ReyDeSirenas</dc:creator>
      <dc:date>2023-04-10T21:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: Create shift from time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-shift-from-time/m-p/3181751#M115055</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="543779" data-lia-user-login="ReyDeSirenas" class="lia-mention lia-mention-user"&gt;ReyDeSirenas&lt;/a&gt;&amp;nbsp; in DAX this is simple to achieve as dates and times work similar to numbers, and you can perform greater than / less than comparisons easily.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This expression as a&amp;nbsp;&lt;STRONG&gt;calculated column&lt;/STRONG&gt; (ie, not measure) in the same table as the time element should work.&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;Shift = &lt;/SPAN&gt;&lt;SPAN&gt;"Shift "&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;If&lt;/SPAN&gt;&lt;SPAN&gt;('Days and hours'[Time] &amp;gt;= &lt;/SPAN&gt;&lt;SPAN&gt;time&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;7&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;30&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;) &amp;amp;&amp;amp; 'Days and hours'[Time] &amp;lt; &lt;/SPAN&gt;&lt;SPAN&gt;time&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;19&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;30&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2023 12:16:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-shift-from-time/m-p/3181751#M115055</guid>
      <dc:creator>PiEye</dc:creator>
      <dc:date>2023-04-11T12:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Create shift from time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-shift-from-time/m-p/3182256#M115077</link>
      <description>&lt;P&gt;Thanks a lot! That worked and you help me a lot to understand how it works!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2023 16:25:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-shift-from-time/m-p/3182256#M115077</guid>
      <dc:creator>ReyDeSirenas</dc:creator>
      <dc:date>2023-04-11T16:25:51Z</dc:date>
    </item>
  </channel>
</rss>

