<?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 Help with FIFO logic with two Tables in DirectQuery in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-FIFO-logic-with-two-Tables-in-DirectQuery/m-p/4610280#M176475</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm struggling with creating a way to measure and/or visualize if a Load Unit that has been delivered to us, was also unloaded first. Deliveries have Priority 1-3 so what we want is, that the first delivery arrived is also the one that is unloaded first.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm stuck with working in DQ and have to tables to do this-&amp;nbsp;&lt;/P&gt;&lt;P&gt;Transports Table and Unloading Table&lt;/P&gt;&lt;P&gt;Transports Table has the Columns LoadUnitId, Priority and ActualArrival Timestamp.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unloading Table has the column StarTime Unloading.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something like this:&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;LoadUnitId&lt;/TD&gt;&lt;TD&gt;Priority&lt;/TD&gt;&lt;TD&gt;ActualArrival&lt;/TD&gt;&lt;TD&gt;StartTime Unloading&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1234&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;01.01.2025 08:00&lt;/TD&gt;&lt;TD&gt;01.01.2025 08:15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4321&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;01.01.2025 07:35&lt;/TD&gt;&lt;TD&gt;01.01.2025 07:56&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2134&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;01.01.2025 07:15&lt;/TD&gt;&lt;TD&gt;01.01.2025 08:19&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What kind of expression can be used to check if a Load Unit that has the same priority, was delivered before another one, but unloaded later.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been thinking of using Ranks but DirectQuery is a bit tricky and won't allow that. Maybe Flags would do the trick but I'm unsure how to use them in this case exactly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be highly appreciated. Thank you very much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 14 Mar 2025 13:14:58 GMT</pubDate>
    <dc:creator>Diaze2108</dc:creator>
    <dc:date>2025-03-14T13:14:58Z</dc:date>
    <item>
      <title>Help with FIFO logic with two Tables in DirectQuery</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-FIFO-logic-with-two-Tables-in-DirectQuery/m-p/4610280#M176475</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm struggling with creating a way to measure and/or visualize if a Load Unit that has been delivered to us, was also unloaded first. Deliveries have Priority 1-3 so what we want is, that the first delivery arrived is also the one that is unloaded first.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm stuck with working in DQ and have to tables to do this-&amp;nbsp;&lt;/P&gt;&lt;P&gt;Transports Table and Unloading Table&lt;/P&gt;&lt;P&gt;Transports Table has the Columns LoadUnitId, Priority and ActualArrival Timestamp.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unloading Table has the column StarTime Unloading.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something like this:&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;LoadUnitId&lt;/TD&gt;&lt;TD&gt;Priority&lt;/TD&gt;&lt;TD&gt;ActualArrival&lt;/TD&gt;&lt;TD&gt;StartTime Unloading&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1234&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;01.01.2025 08:00&lt;/TD&gt;&lt;TD&gt;01.01.2025 08:15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4321&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;01.01.2025 07:35&lt;/TD&gt;&lt;TD&gt;01.01.2025 07:56&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2134&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;01.01.2025 07:15&lt;/TD&gt;&lt;TD&gt;01.01.2025 08:19&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What kind of expression can be used to check if a Load Unit that has the same priority, was delivered before another one, but unloaded later.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been thinking of using Ranks but DirectQuery is a bit tricky and won't allow that. Maybe Flags would do the trick but I'm unsure how to use them in this case exactly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be highly appreciated. Thank you very much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2025 13:14:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-FIFO-logic-with-two-Tables-in-DirectQuery/m-p/4610280#M176475</guid>
      <dc:creator>Diaze2108</dc:creator>
      <dc:date>2025-03-14T13:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: Help with FIFO logic with two Tables in DirectQuery</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-FIFO-logic-with-two-Tables-in-DirectQuery/m-p/4610292#M176479</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="827816" data-lia-user-login="Diaze2108" class="lia-mention lia-mention-user"&gt;Diaze2108&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create two calculated columns to rank the load units based on ActualArrival and StartTime Unloading within each priority group.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;RankArrival = &lt;BR /&gt;RANKX(&lt;BR /&gt;FILTER(CombinedTable, CombinedTable[Priority] = EARLIER(CombinedTable[Priority])),&lt;BR /&gt;CombinedTable[ActualArrival],&lt;BR /&gt;,&lt;BR /&gt;ASC,&lt;BR /&gt;DENSE&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;RankUnloading = &lt;BR /&gt;RANKX(&lt;BR /&gt;FILTER(CombinedTable, CombinedTable[Priority] = EARLIER(CombinedTable[Priority])),&lt;BR /&gt;CombinedTable[StartTime Unloading],&lt;BR /&gt;,&lt;BR /&gt;ASC,&lt;BR /&gt;DENSE&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a calculated column to flag if the load unit that arrived first was also unloaded first.&lt;/P&gt;
&lt;P&gt;IsFirstArrivedUnloadedFirst = &lt;BR /&gt;IF(&lt;BR /&gt;CombinedTable[RankArrival] = 1 &amp;amp;&amp;amp; CombinedTable[RankUnloading] = 1,&lt;BR /&gt;TRUE,&lt;BR /&gt;FALSE&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add a table visual to your report.&lt;BR /&gt;Add the columns LoadUnitId, Priority, ActualArrival, StartTime Unloading, and IsFirstArrivedUnloadedFirst to the table&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2025 13:19:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-FIFO-logic-with-two-Tables-in-DirectQuery/m-p/4610292#M176479</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2025-03-14T13:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: Help with FIFO logic with two Tables in DirectQuery</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-FIFO-logic-with-two-Tables-in-DirectQuery/m-p/4610299#M176480</link>
      <description>&lt;P&gt;Thanks for your quick reply! Unfortunately RANKX Functions are not usable in DirectQuery Models. I have no choice but to work within DQ constraints.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2025 13:23:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-FIFO-logic-with-two-Tables-in-DirectQuery/m-p/4610299#M176480</guid>
      <dc:creator>Diaze2108</dc:creator>
      <dc:date>2025-03-14T13:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: Help with FIFO logic with two Tables in DirectQuery</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-FIFO-logic-with-two-Tables-in-DirectQuery/m-p/4610310#M176481</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="827816" data-lia-user-login="Diaze2108" class="lia-mention lia-mention-user"&gt;Diaze2108&lt;/a&gt;&amp;nbsp;, Try using&lt;/P&gt;
&lt;P&gt;Create a calculated column to flag the earliest arrival within each priority group:&lt;/P&gt;
&lt;P&gt;EARLIEST_ARRIVAL_FLAG = &lt;BR /&gt;IF(&lt;BR /&gt;'Transports Table'[ActualArrival] = &lt;BR /&gt;MINX(&lt;BR /&gt;FILTER(&lt;BR /&gt;'Transports Table', &lt;BR /&gt;'Transports Table'[Priority] = EARLIER('Transports Table'[Priority])&lt;BR /&gt;), &lt;BR /&gt;'Transports Table'[ActualArrival]&lt;BR /&gt;),&lt;BR /&gt;1,&lt;BR /&gt;0&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Similarly&amp;nbsp;Create a calculated column to flag the earliest unloading within each priority group:&lt;/P&gt;
&lt;P&gt;EARLIEST_UNLOADING_FLAG = &lt;BR /&gt;IF(&lt;BR /&gt;'Unloading Table'[StartTime Unloading] = &lt;BR /&gt;MINX(&lt;BR /&gt;FILTER(&lt;BR /&gt;'Unloading Table', &lt;BR /&gt;'Unloading Table'[Priority] = EARLIER('Unloading Table'[Priority])&lt;BR /&gt;), &lt;BR /&gt;'Unloading Table'[StartTime Unloading]&lt;BR /&gt;),&lt;BR /&gt;1,&lt;BR /&gt;0&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Combine the tables and create a final flag to check if the first arrived load unit was also the first unloaded:&lt;/P&gt;
&lt;P&gt;IS_FIRST_ARRIVED_UNLOADED_FIRST = &lt;BR /&gt;IF(&lt;BR /&gt;'Transports Table'[EARLIEST_ARRIVAL_FLAG] = 1 &amp;amp;&amp;amp; &lt;BR /&gt;'Unloading Table'[EARLIEST_UNLOADING_FLAG] = 1,&lt;BR /&gt;TRUE,&lt;BR /&gt;FALSE&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2025 13:30:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-FIFO-logic-with-two-Tables-in-DirectQuery/m-p/4610310#M176481</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2025-03-14T13:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help with FIFO logic with two Tables in DirectQuery</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-FIFO-logic-with-two-Tables-in-DirectQuery/m-p/4660288#M178460</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="827816" data-lia-user-login="Diaze2108" class="lia-mention lia-mention-user"&gt;Diaze2108&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Thank you for reaching out in Microsoft Community Forum.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Thank you&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="625922" data-lia-user-login="bhanu_gautam" class="lia-mention lia-mention-user"&gt;bhanu_gautam&lt;/a&gt;&amp;nbsp;for the helpful response.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;As suggested by bhanu gautam, I hope this information was helpful. Please let me know if you have any further questions or you'd like to discuss this further. If this answers your question, please "&lt;STRONG&gt;Accept as Solution&lt;/STRONG&gt;" and give it a '&lt;STRONG&gt;Kudos&lt;/STRONG&gt;' so others can find it easily.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Please continue using Microsoft community forum.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Pavan.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Apr 2025 04:46:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-FIFO-logic-with-two-Tables-in-DirectQuery/m-p/4660288#M178460</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-04-21T04:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Help with FIFO logic with two Tables in DirectQuery</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-FIFO-logic-with-two-Tables-in-DirectQuery/m-p/4668184#M178811</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="827816" data-lia-user-login="Diaze2108" class="lia-mention lia-mention-user"&gt;Diaze2108&lt;/a&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please "&lt;/SPAN&gt;&lt;STRONG&gt;Accept&amp;nbsp; as&amp;nbsp; Solution&lt;/STRONG&gt;&lt;SPAN&gt;" and give a '&lt;/SPAN&gt;&lt;STRONG&gt;Kudos&lt;/STRONG&gt;&lt;SPAN&gt;' so other members can easily find it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Pavan.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2025 09:26:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-FIFO-logic-with-two-Tables-in-DirectQuery/m-p/4668184#M178811</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-04-25T09:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: Help with FIFO logic with two Tables in DirectQuery</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-FIFO-logic-with-two-Tables-in-DirectQuery/m-p/4678453#M179189</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="827816" data-lia-user-login="Diaze2108" class="lia-mention lia-mention-user"&gt;Diaze2108&lt;/a&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wanted to follow up since we haven't heard back from you regarding our last response. We hope your issue has been resolved.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If the community member's answer your query, please mark it as "&lt;/SPAN&gt;&lt;STRONG&gt;Accept as Solution&lt;/STRONG&gt;&lt;SPAN&gt;" and select "&lt;/SPAN&gt;&lt;STRONG&gt;Yes&lt;/STRONG&gt;&lt;SPAN&gt;" if it was helpful.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you need any further assistance, feel free to reach out.&lt;BR /&gt;&lt;BR /&gt;Please continue using Microsoft community forum.&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Pavan.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 03 May 2025 12:17:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-FIFO-logic-with-two-Tables-in-DirectQuery/m-p/4678453#M179189</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-05-03T12:17:11Z</dc:date>
    </item>
  </channel>
</rss>

