<?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: Calculate QTY for a two part IF function in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-QTY-for-a-two-part-IF-function/m-p/4019003#M158576</link>
    <description>&lt;P&gt;Hi this is having the same issue it is only returning the top value of the BOM not all of the values for each component.&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jul 2024 17:22:03 GMT</pubDate>
    <dc:creator>Jorjor</dc:creator>
    <dc:date>2024-07-01T17:22:03Z</dc:date>
    <item>
      <title>Calculate QTY for a two part IF function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-QTY-for-a-two-part-IF-function/m-p/4018985#M158574</link>
      <description>&lt;P&gt;I want to calculate the QTY for each component in my data set. The forumula I'm using is only calculating for the top item not all of them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;BOM Q =&lt;/SPAN&gt; &lt;SPAN&gt;SUMX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'All Demand'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;[BOM ID]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;EARLIER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'WORKORDERS_OPEN'&lt;/SPAN&gt;&lt;SPAN&gt;[BOM ID]&lt;/SPAN&gt;&lt;SPAN&gt;) &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;[Component]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;EARLIER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'WORKORDERS_OPEN'&lt;/SPAN&gt;&lt;SPAN&gt;[Component]&lt;/SPAN&gt;&lt;SPAN&gt;)),&lt;/SPAN&gt;&lt;SPAN&gt;[BOM QTY]&lt;/SPAN&gt;&lt;SPAN&gt;*&lt;/SPAN&gt;&lt;SPAN&gt;[REPORTREMAINASFINISHED]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 01 Jul 2024 17:06:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-QTY-for-a-two-part-IF-function/m-p/4018985#M158574</guid>
      <dc:creator>Jorjor</dc:creator>
      <dc:date>2024-07-01T17:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate QTY for a two part IF function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-QTY-for-a-two-part-IF-function/m-p/4018992#M158575</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="751697" data-lia-user-login="Jorjor" class="lia-mention lia-mention-user"&gt;Jorjor&lt;/a&gt;&amp;nbsp;-create a measure to calculate the QTY for each component&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;QTY Measure =&lt;BR /&gt;SUMX(&lt;BR /&gt;FILTER(&lt;BR /&gt;'All Demand',&lt;BR /&gt;'All Demand'[BOM ID] = 'WORKORDERS_OPEN'[BOM ID]&lt;BR /&gt;&amp;amp;&amp;amp; 'All Demand'[Component] = 'WORKORDERS_OPEN'[Component]&lt;BR /&gt;),&lt;BR /&gt;'All Demand'[BOM QTY] * 'WORKORDERS_OPEN'[REPORTREMAINASFINISHED]&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it works for both components.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution! This will help others on the forum!&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#000080"&gt;&lt;STRONG&gt;Appreciate your Kudos!!&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 17:12:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-QTY-for-a-two-part-IF-function/m-p/4018992#M158575</guid>
      <dc:creator>rajendraongole1</dc:creator>
      <dc:date>2024-07-01T17:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate QTY for a two part IF function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-QTY-for-a-two-part-IF-function/m-p/4019003#M158576</link>
      <description>&lt;P&gt;Hi this is having the same issue it is only returning the top value of the BOM not all of the values for each component.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 17:22:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-QTY-for-a-two-part-IF-function/m-p/4019003#M158576</guid>
      <dc:creator>Jorjor</dc:creator>
      <dc:date>2024-07-01T17:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate QTY for a two part IF function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-QTY-for-a-two-part-IF-function/m-p/4019705#M158577</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="751697" data-lia-user-login="Jorjor" class="lia-mention lia-mention-user"&gt;Jorjor&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try formula like below to calculate QTY = Remanin finish * BOM QTY:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;QTY 1 =
VAR CurrentBOMID = 'RemainingFinishTable'[BOM ID]
VAR CurrentComponent = 'RemainingFinishTable'[Component]
VAR BOMQTY =
    CALCULATE (
        SUM ( 'BOMTable'[BOM QTY] ),
        FILTER (
            'BOMTable',
            'BOMTable'[BOM ID] = CurrentBOMID
                &amp;amp;&amp;amp; 'BOMTable'[Component] = CurrentComponent
        )
    )
RETURN
    BOMQTY * 'RemainingFinishTable'[Remain Finish]
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Adamk Kong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 05:48:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-QTY-for-a-two-part-IF-function/m-p/4019705#M158577</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-02T05:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate QTY for a two part IF function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-QTY-for-a-two-part-IF-function/m-p/4020451#M158607</link>
      <description>&lt;P&gt;Still getting the same error think it is an issue with my data as a whole thanks for the help.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 12:22:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-QTY-for-a-two-part-IF-function/m-p/4020451#M158607</guid>
      <dc:creator>Jorjor</dc:creator>
      <dc:date>2024-07-02T12:22:16Z</dc:date>
    </item>
  </channel>
</rss>

