<?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 on Measure Selected in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-on-Measure-Selected/m-p/2345111#M59295</link>
    <description>&lt;P&gt;Hi Everyone!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to select&amp;nbsp;&lt;STRONG&gt;only 1&lt;/STRONG&gt;&amp;nbsp;lab and N products for many Labs. I need to find the price&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;per month&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;of my product (my_price) and compare to the total_prod_price of each prod to find the difference (%) between my product and the others.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample file:&amp;nbsp;&lt;A href="https://www.dropbox.com/s/jh9ctxatt079dvq/Sample%28Updated2%29%20%281%29.pbix?dl=0" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.dropbox.com/s/jh9ctxatt079dvq/Sample%28Updated2%29%20%281%29.pbix?dl=0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected output:&lt;/P&gt;&lt;P&gt;Product A, my _price=1600, total_prod_price = 1100, dif = 1100/1600, month = Oct&lt;/P&gt;&lt;P&gt;Product B,&amp;nbsp;my _price=1600,&amp;nbsp;total_prod_price = 1600,&amp;nbsp;dif = 1600/1600,&amp;nbsp;month = Oct&lt;/P&gt;&lt;P&gt;Product C,&amp;nbsp;my _price=1600,&amp;nbsp;total_prod_price = 2100, dif = 2100/1600, month = Oct&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 17 Feb 2022 14:32:21 GMT</pubDate>
    <dc:creator>orghn</dc:creator>
    <dc:date>2022-02-17T14:32:21Z</dc:date>
    <item>
      <title>Help on Measure Selected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-on-Measure-Selected/m-p/2345111#M59295</link>
      <description>&lt;P&gt;Hi Everyone!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to select&amp;nbsp;&lt;STRONG&gt;only 1&lt;/STRONG&gt;&amp;nbsp;lab and N products for many Labs. I need to find the price&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;per month&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;of my product (my_price) and compare to the total_prod_price of each prod to find the difference (%) between my product and the others.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample file:&amp;nbsp;&lt;A href="https://www.dropbox.com/s/jh9ctxatt079dvq/Sample%28Updated2%29%20%281%29.pbix?dl=0" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.dropbox.com/s/jh9ctxatt079dvq/Sample%28Updated2%29%20%281%29.pbix?dl=0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected output:&lt;/P&gt;&lt;P&gt;Product A, my _price=1600, total_prod_price = 1100, dif = 1100/1600, month = Oct&lt;/P&gt;&lt;P&gt;Product B,&amp;nbsp;my _price=1600,&amp;nbsp;total_prod_price = 1600,&amp;nbsp;dif = 1600/1600,&amp;nbsp;month = Oct&lt;/P&gt;&lt;P&gt;Product C,&amp;nbsp;my _price=1600,&amp;nbsp;total_prod_price = 2100, dif = 2100/1600, month = Oct&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 14:32:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-on-Measure-Selected/m-p/2345111#M59295</guid>
      <dc:creator>orghn</dc:creator>
      <dc:date>2022-02-17T14:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Help on Measure Selected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-on-Measure-Selected/m-p/2349927#M59610</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="354150" data-lia-user-login="orghn" class="lia-mention lia-mention-user"&gt;orghn&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on my understanding,&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Select Lab B, the related Product is&amp;nbsp; B,E&lt;/LI&gt;
&lt;LI&gt;Select&amp;nbsp;Product Name A,B,C&lt;/LI&gt;
&lt;LI&gt;Since the same&amp;nbsp;Product based on 1 and 2 is B, so my_price=Product B=1600&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so,please firstly delete the relationship between Lab Table and&amp;nbsp;Product Table:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then create the measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;my price measure = 
var _allProds=SUMMARIZE(FILTER(ALL('Product'),[LabName] =MAX('Lab'[Lab Name])),[ProductName])
return CALCULATE(SUM('Price'[Price]),FILTER(ALLSELECTED('Price'),[Product] in _allProds))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Eyelyn Qin&lt;BR /&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 03:39:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-on-Measure-Selected/m-p/2349927#M59610</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-21T03:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help on Measure Selected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-on-Measure-Selected/m-p/2351219#M59688</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help but I cant delete that relationship. And I also need to select N months&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 13:27:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-on-Measure-Selected/m-p/2351219#M59688</guid>
      <dc:creator>orghn</dc:creator>
      <dc:date>2022-02-21T13:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: Help on Measure Selected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-on-Measure-Selected/m-p/2352042#M59743</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="354150" data-lia-user-login="orghn" class="lia-mention lia-mention-user"&gt;orghn&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.&lt;U&gt;&lt;EM&gt;but I cant delete that relationship.&lt;/EM&gt;&lt;/U&gt;&amp;nbsp; You could create a new Lab table for the slicer:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;New Table = VALUES(Lab[Lab Name])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Measure = 
var _allProds=SUMMARIZE(FILTER(ALL('Product'),[LabName] =MAX('New Table'[Lab Name])),[ProductName])
return CALCULATE(SUM('Price'[Price]),FILTER(ALLSELECTED('Price'),[Product] in _allProds))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;diff = [Measure]/[Total_Prod_Price] &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp;&lt;U&gt;&lt;EM&gt;And I also need to select N months&lt;/EM&gt;&lt;/U&gt;&amp;nbsp; &amp;nbsp;So what's your expected when select multiple months?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On my side:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Eyelyn Qin&lt;BR /&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 01:17:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-on-Measure-Selected/m-p/2352042#M59743</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-22T01:17:37Z</dc:date>
    </item>
  </channel>
</rss>

