<?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: weighted average price in powerbi with multiple filters in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/weighted-average-price-in-powerbi-with-multiple-filters/m-p/4031280#M159443</link>
    <description>&lt;P&gt;Hi,&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="653820" data-lia-user-login="yaya1974" class="lia-mention lia-mention-user"&gt;yaya1974&lt;/a&gt; .&lt;BR /&gt;You are welcome.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jul 2024 01:13:51 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-07-09T01:13:51Z</dc:date>
    <item>
      <title>weighted average price in powerbi with multiple filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/weighted-average-price-in-powerbi-with-multiple-filters/m-p/4023639#M158800</link>
      <description>&lt;P&gt;I am trying to calculate my weighted avg price based on 4 different columns.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need the filters by Year, PL Market, Model, and Finish&lt;/P&gt;&lt;P&gt;I've tried all sorts of formulas, all ending up with errors.&amp;nbsp; This is my last one, but not filtered on anything.&lt;/P&gt;&lt;P&gt;Weight = DIVIDE(SUMX(Costs,Costs[OEM/OES Price]*Costs[Shipped]),SUMX(Costs,Costs[OEM/OES Price]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is example in excel with outcome I am looking for in yellow:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Can anyone help, please?&lt;/P&gt;&lt;P&gt;Thank you! &lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 20:03:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/weighted-average-price-in-powerbi-with-multiple-filters/m-p/4023639#M158800</guid>
      <dc:creator>yaya1974</dc:creator>
      <dc:date>2024-07-03T20:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: weighted average price in powerbi with multiple filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/weighted-average-price-in-powerbi-with-multiple-filters/m-p/4023875#M158814</link>
      <description>&lt;P&gt;Hi,&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="653820" data-lia-user-login="yaya1974" class="lia-mention lia-mention-user"&gt;yaya1974&lt;/a&gt;&amp;nbsp; I am glad to help you.&lt;/P&gt;
&lt;P&gt;If you want to get the most basic calculations. I.e. the final result that you have marked in excel with a yellow background, you can refer to my test result below&lt;BR /&gt;Note that I have used ALL() in the measure which will remove all the filters, so if you want the filter (slicer) restrictions to be calculated inside the measure you may need to use the ALLSELECTED() or ALLEXCEPT() functions to suit your real calculation environment.&lt;BR /&gt;Of course, if you just want to get the results you want to show in excel, you can refer to my measures and calculate column below.&lt;/P&gt;
&lt;P&gt;Here is the DAX code I create.&lt;BR /&gt;&lt;BR /&gt;Calculate column:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Ext. Price = 'product'[Units]*[7.1.23 Price]
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Measure:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;M_Ext_PriceSum = CALCULATE(SUM('product'[Ext. Price]),FILTER(ALL('product'),'product'[PL Market]=MAX('product'[PL Market])))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;M_MarketNum = CALCULATE(SUM('product'[Units]),FILTER(ALL('product'),'product'[PL Market]=MAX('product'[PL Market])))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;M_result = DIVIDE([M_Ext_PriceSum],[M_MarketNum],0) &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my test data:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Carson Jian,&lt;/P&gt;
&lt;P&gt;If this post &lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&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>Thu, 04 Jul 2024 01:43:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/weighted-average-price-in-powerbi-with-multiple-filters/m-p/4023875#M158814</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-04T01:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: weighted average price in powerbi with multiple filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/weighted-average-price-in-powerbi-with-multiple-filters/m-p/4030781#M159390</link>
      <description>&lt;P&gt;Thanks so much!!&amp;nbsp; &amp;nbsp;IT worked perfectly.&amp;nbsp; I did use the Allexcept function though, as I had more columns to filter out.&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2024 16:42:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/weighted-average-price-in-powerbi-with-multiple-filters/m-p/4030781#M159390</guid>
      <dc:creator>yaya1974</dc:creator>
      <dc:date>2024-07-08T16:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: weighted average price in powerbi with multiple filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/weighted-average-price-in-powerbi-with-multiple-filters/m-p/4031280#M159443</link>
      <description>&lt;P&gt;Hi,&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="653820" data-lia-user-login="yaya1974" class="lia-mention lia-mention-user"&gt;yaya1974&lt;/a&gt; .&lt;BR /&gt;You are welcome.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2024 01:13:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/weighted-average-price-in-powerbi-with-multiple-filters/m-p/4031280#M159443</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-09T01:13:51Z</dc:date>
    </item>
  </channel>
</rss>

