<?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 Need to return RELATED value for SKUs with Alternative IDs in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-return-RELATED-value-for-SKUs-with-Alternative-IDs/m-p/930661#M9544</link>
    <description>&lt;P&gt;Folks -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a sistuation were I need to return the total number of Orders for a particular SKU. However - If the SKU has an Alternative SKU, I would like to see the number of orders for the Alternative SKU instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far - I have pulled the neccessary data into Power bI, and have set up the relationships accordingly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a ProductTable which contains both the SKU, and the Alternative SKU. I wanted to use the RELATED DAX to return the # of Orders - Which works. However, the SKUs that have alternative SKUs return a 0 for # of orders. This is accurate, and as expected. However - because these values have an alternative SKU - Is there a way to lookup to alternative SKUs On PO# instead?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where I get stuck -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;QTY on PO = 
  IF( 
    ISBLANK ( PRODUCTTABLE[ALTERNATIVEID ),
     RELATED ( QTYonPO ),


    &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im not sure now how to point it to the AlternativeID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if any ideas are out there, or if any addtional information is needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 12 Feb 2020 18:54:58 GMT</pubDate>
    <dc:creator>AlexAlberga727</dc:creator>
    <dc:date>2020-02-12T18:54:58Z</dc:date>
    <item>
      <title>Need to return RELATED value for SKUs with Alternative IDs</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-return-RELATED-value-for-SKUs-with-Alternative-IDs/m-p/930661#M9544</link>
      <description>&lt;P&gt;Folks -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a sistuation were I need to return the total number of Orders for a particular SKU. However - If the SKU has an Alternative SKU, I would like to see the number of orders for the Alternative SKU instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far - I have pulled the neccessary data into Power bI, and have set up the relationships accordingly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a ProductTable which contains both the SKU, and the Alternative SKU. I wanted to use the RELATED DAX to return the # of Orders - Which works. However, the SKUs that have alternative SKUs return a 0 for # of orders. This is accurate, and as expected. However - because these values have an alternative SKU - Is there a way to lookup to alternative SKUs On PO# instead?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where I get stuck -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;QTY on PO = 
  IF( 
    ISBLANK ( PRODUCTTABLE[ALTERNATIVEID ),
     RELATED ( QTYonPO ),


    &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im not sure now how to point it to the AlternativeID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if any ideas are out there, or if any addtional information is needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 18:54:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-return-RELATED-value-for-SKUs-with-Alternative-IDs/m-p/930661#M9544</guid>
      <dc:creator>AlexAlberga727</dc:creator>
      <dc:date>2020-02-12T18:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Need to return RELATED value for SKUs with Alternative IDs</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-return-RELATED-value-for-SKUs-with-Alternative-IDs/m-p/930665#M9545</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an example of what I would need. - Where Alternative SKUs ISBLANK - Simply gather the On Po #s using the RELATED DAX. This works with no issue. The problem I have is when Alternative SKU is populated - How can I then tell it to gather the number "On Order" for the &lt;STRONG&gt;&lt;U&gt;Alternative SKU&lt;/U&gt;&lt;/STRONG&gt;, &lt;U&gt;&lt;STRONG&gt;NOT&lt;/STRONG&gt;&lt;/U&gt; the &lt;U&gt;&lt;STRONG&gt;SKU&lt;/STRONG&gt;&lt;/U&gt;,&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 18:58:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-return-RELATED-value-for-SKUs-with-Alternative-IDs/m-p/930665#M9545</guid>
      <dc:creator>AlexAlberga727</dc:creator>
      <dc:date>2020-02-12T18:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need to return RELATED value for SKUs with Alternative IDs</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-return-RELATED-value-for-SKUs-with-Alternative-IDs/m-p/930682#M9548</link>
      <description>&lt;LI-CODE lang="markup"&gt;QTYonPOv2 = 
 IF( ISBLANK( dProductTable[PartID] ),
    RELATED( 'dInvVALUE (Keep Up-to-Date)'[QTY on PO] ),

    LOOKUPVALUE( 'dInvVALUE (Keep Up-to-Date)'[QTY on PO], 'dInvVALUE (Keep Up-to-Date)'[ProductID], dProductTable[PartID] ))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I feel this may be to solution - However, I am new to LOOKUPVALUE. Not sure if I have configured it correctly. Results are currenlty are Blank when PARTID is NOT BLANK. It is returning the RELATED values correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dInVALUE Table contains the [QTY on PO] #s.&lt;/P&gt;&lt;P&gt;dInvValue[ProductID] is where dProductTable[PartID] can be found.&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>Wed, 12 Feb 2020 19:27:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-return-RELATED-value-for-SKUs-with-Alternative-IDs/m-p/930682#M9548</guid>
      <dc:creator>AlexAlberga727</dc:creator>
      <dc:date>2020-02-12T19:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: Need to return RELATED value for SKUs with Alternative IDs</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-return-RELATED-value-for-SKUs-with-Alternative-IDs/m-p/930686#M9549</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="82403" data-lia-user-login="az38" class="lia-mention lia-mention-user"&gt;az38&lt;/a&gt;&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="137611" data-lia-user-login="JarroVGIT" class="lia-mention lia-mention-user"&gt;JarroVGIT&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Either of you Super Contributors able to assist with this one? Please/Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 19:33:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-return-RELATED-value-for-SKUs-with-Alternative-IDs/m-p/930686#M9549</guid>
      <dc:creator>AlexAlberga727</dc:creator>
      <dc:date>2020-02-12T19:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Need to return RELATED value for SKUs with Alternative IDs</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-return-RELATED-value-for-SKUs-with-Alternative-IDs/m-p/931154#M9560</link>
      <description>&lt;BR /&gt;Column= if(isblank(max(table[alter id])),ralated(table1[order]),table[order])&lt;BR /&gt;&lt;BR /&gt;Here the logic is ...if alter id is blank then take order from related table else take order from same table.&lt;BR /&gt;&lt;BR /&gt;Incase at first load your alter id is empty...and later you have alter id for particular row then you have to refresh your data..the abouve formula will give you expected result.&lt;BR /&gt;&lt;BR /&gt;I am assunming here table and table 1 is connected.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Pravin</description>
      <pubDate>Thu, 13 Feb 2020 06:04:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-return-RELATED-value-for-SKUs-with-Alternative-IDs/m-p/931154#M9560</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-13T06:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: Need to return RELATED value for SKUs with Alternative IDs</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-return-RELATED-value-for-SKUs-with-Alternative-IDs/m-p/931768#M9576</link>
      <description>&lt;P&gt;Unfortuneatly Im trying to tie in data from a flat file that is updated everyday. This file contains a list of SKUs on a # of Products on Order from the factory. I need to pull this number into my reporting. However, all SKUs are listed in a single column. This column contains both, what we're calling SKUs and Alternative SKUs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example - SKU "123" has an Alternative SKU "123-Alternative". Both SKUs are found within the same column. However, SKU 123's "On PO" # is 0, whereas 123-Alternative contains 100. The formula I create would need to return 100 for SKU 123, because it contains an alternative SKU.&lt;/P&gt;&lt;P&gt;This needs to ocurr for a couple of SKUs (~10), so i created a table which contains the relationship between SKUs and their Alternative SKU.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a couple different calculated columns in data view to make things easier.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;SKU&lt;/TD&gt;&lt;TD&gt;Alternative SKU&lt;/TD&gt;&lt;TD&gt;QTY on PO&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;123-Alternative&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123-Alternative&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;456&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;789-Alternative&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;100&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;789&lt;/TD&gt;&lt;TD&gt;789-Alternative&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;100&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;File which contains the QTY on PO is loaded into its own table, and the table containing the above is linked via ProductID.&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;I feel like i need to either use LOOKUPVALUE or... have RELATED point to the alternativeID when gathering QTYonPO opposed to the SKU the record is truley for.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this clears things up, and not make them more complicated/confusing. Please let me know if you have any ideas.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 12:59:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-return-RELATED-value-for-SKUs-with-Alternative-IDs/m-p/931768#M9576</guid>
      <dc:creator>AlexAlberga727</dc:creator>
      <dc:date>2020-02-13T12:59:50Z</dc:date>
    </item>
  </channel>
</rss>

