<?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: Fitting timestamps into custom time grid in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fitting-timestamps-into-custom-time-grid/m-p/2877122#M92988</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="464926" data-lia-user-login="YvesBruckmayer" class="lia-mention lia-mention-user"&gt;YvesBruckmayer&lt;/a&gt;&amp;nbsp;, I'm not sure I'm following.. You do have a table (a second one) with 'Lesson' column that you can use in your matrix.&lt;/P&gt;</description>
    <pubDate>Tue, 01 Nov 2022 11:41:47 GMT</pubDate>
    <dc:creator>ERD</dc:creator>
    <dc:date>2022-11-01T11:41:47Z</dc:date>
    <item>
      <title>Fitting timestamps into custom time grid</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fitting-timestamps-into-custom-time-grid/m-p/2876662#M92967</link>
      <description>&lt;P&gt;I need to fit timestamps into a custom time grid.&lt;/P&gt;&lt;P&gt;I have a table with elements where each one defines a booking of a room with a begin time and and end time specifiying the length of the booking.&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;Room&lt;/TD&gt;&lt;TD&gt;Begin&lt;/TD&gt;&lt;TD&gt;End&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1111&lt;/TD&gt;&lt;TD&gt;Room1&lt;/TD&gt;&lt;TD&gt;1.1.22 8:00:00&lt;/TD&gt;&lt;TD&gt;1.1.22 8:45:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1112&lt;/TD&gt;&lt;TD&gt;Room6&lt;/TD&gt;&lt;TD&gt;2.1.22 9:00:00&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;2.1.22 9:45:00&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;This is for a school and the time grid is split into 45min lessons with breaks in between:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Lesson&lt;/TD&gt;&lt;TD&gt;Begin&lt;/TD&gt;&lt;TD&gt;End&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;08:00&lt;/TD&gt;&lt;TD&gt;08:45&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;08:50&lt;/TD&gt;&lt;TD&gt;09:35&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've put this time grid into a separate table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal now is to get the lesson number for each booking by checking whether the begin time of the booking is larger or equal than the begin time of a given lesson and the end time is smaller or equal. Essentially testing what lesson the booking falls into.&lt;/P&gt;&lt;P&gt;It's fine to assume that no bookings can take up more than one lesson for my purposes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would I do this?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 08:57:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fitting-timestamps-into-custom-time-grid/m-p/2876662#M92967</guid>
      <dc:creator>YvesBruckmayer</dc:creator>
      <dc:date>2022-11-01T08:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Fitting timestamps into custom time grid</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fitting-timestamps-into-custom-time-grid/m-p/2876849#M92971</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="464926" data-lia-user-login="YvesBruckmayer" class="lia-mention lia-mention-user"&gt;YvesBruckmayer&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;You can try this measure:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Lesson =
VAR startTime = FORMAT ( SELECTEDVALUE ( Booking[Begin] ), "hh:mm:ss AM/PM" )
VAR endTime = FORMAT ( SELECTEDVALUE ( Booking[End] ), "hh:mm:ss AM/PM" )
VAR lesson =
    CALCULATE (
        MAX ( school[Lesson] ),
        startTime &amp;gt;= FORMAT ( school[Begin], "hh:mm:ss AM/PM" ),
        endTime &amp;lt;= FORMAT ( Booking[End], "hh:mm:ss AM/PM" )
    )
RETURN
    lesson&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 01 Nov 2022 09:52:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fitting-timestamps-into-custom-time-grid/m-p/2876849#M92971</guid>
      <dc:creator>ERD</dc:creator>
      <dc:date>2022-11-01T09:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Fitting timestamps into custom time grid</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fitting-timestamps-into-custom-time-grid/m-p/2876942#M92980</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291363" data-lia-user-login="ERD" class="lia-mention lia-mention-user"&gt;ERD&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you. This measure seems to work. At least it looks good when I put into a simple table visual.&lt;/P&gt;&lt;P&gt;However It won't let me use it as a column value in my matrix visual.&lt;/P&gt;&lt;P&gt;Can you not use measures as columns in matrix visuals?&lt;/P&gt;&lt;P&gt;This is my visual as it was with just the hour.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;All I want is to replace the hour columns with the appropriate lesson numbers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 10:19:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fitting-timestamps-into-custom-time-grid/m-p/2876942#M92980</guid>
      <dc:creator>YvesBruckmayer</dc:creator>
      <dc:date>2022-11-01T10:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: Fitting timestamps into custom time grid</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fitting-timestamps-into-custom-time-grid/m-p/2877122#M92988</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="464926" data-lia-user-login="YvesBruckmayer" class="lia-mention lia-mention-user"&gt;YvesBruckmayer&lt;/a&gt;&amp;nbsp;, I'm not sure I'm following.. You do have a table (a second one) with 'Lesson' column that you can use in your matrix.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 11:41:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fitting-timestamps-into-custom-time-grid/m-p/2877122#M92988</guid>
      <dc:creator>ERD</dc:creator>
      <dc:date>2022-11-01T11:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: Fitting timestamps into custom time grid</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fitting-timestamps-into-custom-time-grid/m-p/2877627#M93014</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291363" data-lia-user-login="ERD" class="lia-mention lia-mention-user"&gt;ERD&lt;/a&gt;&amp;nbsp;I do but it's currently not related to the booking table at all.&lt;/P&gt;&lt;P&gt;When I try to select the "Lesson" column in the matrix, it just gives me an error.&lt;/P&gt;&lt;P&gt;I also can't create a relation between the two tables because it won't let me create one between a measure and a column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 15:06:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fitting-timestamps-into-custom-time-grid/m-p/2877627#M93014</guid>
      <dc:creator>YvesBruckmayer</dc:creator>
      <dc:date>2022-11-01T15:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: Fitting timestamps into custom time grid</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fitting-timestamps-into-custom-time-grid/m-p/2877636#M93017</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291363" data-lia-user-login="ERD" class="lia-mention lia-mention-user"&gt;ERD&lt;/a&gt;&amp;nbsp; Nevermind. I think I have what I need.&lt;/P&gt;&lt;P&gt;The same DAX works as a custom column which I can then just select.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 15:12:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fitting-timestamps-into-custom-time-grid/m-p/2877636#M93017</guid>
      <dc:creator>YvesBruckmayer</dc:creator>
      <dc:date>2022-11-01T15:12:55Z</dc:date>
    </item>
  </channel>
</rss>

