<?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 DAX Measure to get data based on condition from two tables? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-DAX-Measure-to-get-data-based-on-condition-from-two/m-p/897753#M8147</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="197895" data-lia-user-login="Parisha" class="lia-mention lia-mention-user"&gt;Parisha&lt;/a&gt;&amp;nbsp; Thanks a lot...It is working..great...I did put a lot of time on search and try and finally got the solution..Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jan 2020 09:16:33 GMT</pubDate>
    <dc:creator>YasarKhan</dc:creator>
    <dc:date>2020-01-13T09:16:33Z</dc:date>
    <item>
      <title>Create DAX Measure to get data based on condition from two tables?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-DAX-Measure-to-get-data-based-on-condition-from-two/m-p/897616#M8138</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a situation where I need to calculate quantity based on the condition of two date fields which are placed in two different tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to calculate the &lt;STRONG&gt;sum of delivered quantity(Table2-CustPackingSlipTrans)&lt;/STRONG&gt; where &lt;STRONG&gt;&lt;U&gt;Table2.&lt;STRONG&gt;delivery date&lt;/STRONG&gt;&lt;/U&gt;(CustPackingSlipTrans.DeliveryDate)&lt;/STRONG&gt; must be less than the &lt;U&gt;&lt;STRONG&gt;Table1.requested ship date&lt;/STRONG&gt;&lt;/U&gt;&lt;STRONG&gt;(SalesLine.RequestedShipDate)&lt;/STRONG&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the above formula, I will be able to calculate the sales OTIF(OnTimeInFull).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Relationship: Table1.InventTransId(1):Table2.InventTransId(Many)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Table1 - Sales Line&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;InventTransId&lt;/TD&gt;&lt;TD&gt;ItemId&lt;/TD&gt;&lt;TD&gt;OrderedQty&lt;/TD&gt;&lt;TD&gt;Requested Ship Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;LOT-0001&lt;/TD&gt;&lt;TD&gt;ABC&lt;/TD&gt;&lt;TD&gt;10000&lt;/TD&gt;&lt;TD&gt;25-Dec-19&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Table2 - CustPackingslipTrans&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;InvenTransId&lt;/TD&gt;&lt;TD&gt;Delivered Qty&lt;/TD&gt;&lt;TD&gt;DeliveryDate&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;LOT-0001&lt;/TD&gt;&lt;TD&gt;2000&lt;/TD&gt;&lt;TD&gt;12-Nov-19&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;LOT-0001&lt;/TD&gt;&lt;TD&gt;2500&lt;/TD&gt;&lt;TD&gt;01-Dec-19&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;LOT-0001&lt;/TD&gt;&lt;TD&gt;3500&lt;/TD&gt;&lt;TD&gt;31-Dec-19&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;LOT-0001&lt;/TD&gt;&lt;TD&gt;2000&lt;/TD&gt;&lt;TD&gt;02-Jan-19&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried below the DAX query but without success.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Delivered Qty = CALCULATE(SUM('stage CUSTPACKINGSLIPTRANS'[QTY]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OTIF = CALCULATE([Delivered Qty], FILTER('stage CUSTPACKINGSLIPTRANS', 'stage CUSTPACKINGSLIPTRANS'[DELIVERYDATE].[Date]&amp;lt;= 'stage SALESLINE’ [REQUESTEDSHIPDATE].[Date]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone please help me on how to get the above result using DAX Custom Measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;/P&gt;&lt;P&gt;Yasar&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2020 07:53:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-DAX-Measure-to-get-data-based-on-condition-from-two/m-p/897616#M8138</guid>
      <dc:creator>YasarKhan</dc:creator>
      <dc:date>2020-01-13T07:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: Create DAX Measure to get data based on condition from two tables?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-DAX-Measure-to-get-data-based-on-condition-from-two/m-p/897671#M8143</link>
      <description>Try modifying your measure as below and check ... OTIF = CALCULATE(sum(CustPackingslipTrans[Delivered Qty]), FILTER('CUSTPACKINGSLIPTRANS', 'CUSTPACKINGSLIPTRANS'[DELIVERYDATE].[Date]&amp;lt;= RELATED('Sales Line'[Requested Ship Date].[Date])))</description>
      <pubDate>Mon, 13 Jan 2020 08:26:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-DAX-Measure-to-get-data-based-on-condition-from-two/m-p/897671#M8143</guid>
      <dc:creator>Parisha</dc:creator>
      <dc:date>2020-01-13T08:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: Create DAX Measure to get data based on condition from two tables?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-DAX-Measure-to-get-data-based-on-condition-from-two/m-p/897753#M8147</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="197895" data-lia-user-login="Parisha" class="lia-mention lia-mention-user"&gt;Parisha&lt;/a&gt;&amp;nbsp; Thanks a lot...It is working..great...I did put a lot of time on search and try and finally got the solution..Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2020 09:16:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-DAX-Measure-to-get-data-based-on-condition-from-two/m-p/897753#M8147</guid>
      <dc:creator>YasarKhan</dc:creator>
      <dc:date>2020-01-13T09:16:33Z</dc:date>
    </item>
  </channel>
</rss>

