<?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: Show overall average price per product but only for product with sales in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-overall-average-price-per-product-but-only-for-product-with/m-p/4011394#M157890</link>
    <description>&lt;P&gt;Thank you Anonymous&lt;/LI-USER&gt;&amp;nbsp;for your reply !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I try the formula above I get the below. I want to see 2.17 repeated along all the rows for all articles (or attribute of article like brand in this case) but only show rows that actually have sales rather than all articles from the master&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;Thank you !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jun 2024 13:37:06 GMT</pubDate>
    <dc:creator>nedpbi</dc:creator>
    <dc:date>2024-06-26T13:37:06Z</dc:date>
    <item>
      <title>Show overall average price per product but only for product with sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-overall-average-price-per-product-but-only-for-product-with/m-p/4009835#M157731</link>
      <description>&lt;P&gt;Dear Community Members,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a product table and a sales table like the below. Both are linked by product.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I have two measures average price and overall average price which is the total sold amt / total qty.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I display them in the table they come up correctly but as below. Is it possible to define the overall overage price so that it is only calculated for products that have sales against them ?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I have attached the sample pbix file.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/scl/fi/rp5x90ddjl6we3wzr53u1/Overall-Avg-Price.pbix?rlkey=x2hfc8x71obqqwpa5qxdhey6k&amp;amp;st=we9tg7oe&amp;amp;dl=0" target="_blank"&gt;https://www.dropbox.com/scl/fi/rp5x90ddjl6we3wzr53u1/Overall-Avg-Price.pbix?rlkey=x2hfc8x71obqqwpa5qxdhey6k&amp;amp;st=we9tg7oe&amp;amp;dl=0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for any suggestions !&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 21:11:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-overall-average-price-per-product-but-only-for-product-with/m-p/4009835#M157731</guid>
      <dc:creator>nedpbi</dc:creator>
      <dc:date>2024-06-25T21:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: Show overall average price per product but only for product with sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-overall-average-price-per-product-but-only-for-product-with/m-p/4010057#M157766</link>
      <description>&lt;P&gt;&lt;FONT&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="696746" data-lia-user-login="nedpbi" class="lia-mention lia-mention-user"&gt;nedpbi&lt;/a&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You want only calculated for products that have sales, you just need to add a filter with sales greater than 0.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;DAX:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Overall Avg Price for Products with Sales = 
CALCULATE(
    DIVIDE(SUM(Sales[Amt]), SUM(Sales[Qty])),
    FILTER(
        Sales,
        Sales[Qty] &amp;gt; 0
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jayleny&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 01:36:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-overall-average-price-per-product-but-only-for-product-with/m-p/4010057#M157766</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-06-26T01:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Show overall average price per product but only for product with sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-overall-average-price-per-product-but-only-for-product-with/m-p/4011394#M157890</link>
      <description>&lt;P&gt;Thank you Anonymous&lt;/a&gt;&amp;nbsp;for your reply !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I try the formula above I get the below. I want to see 2.17 repeated along all the rows for all articles (or attribute of article like brand in this case) but only show rows that actually have sales rather than all articles from the master&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;Thank you !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 13:37:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-overall-average-price-per-product-but-only-for-product-with/m-p/4011394#M157890</guid>
      <dc:creator>nedpbi</dc:creator>
      <dc:date>2024-06-26T13:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Show overall average price per product but only for product with sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-overall-average-price-per-product-but-only-for-product-with/m-p/4012018#M157964</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;maybe did not understand correctly, but tried the below and this seems to work. Thanks again for the help !&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 21:18:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-overall-average-price-per-product-but-only-for-product-with/m-p/4012018#M157964</guid>
      <dc:creator>nedpbi</dc:creator>
      <dc:date>2024-06-26T21:18:23Z</dc:date>
    </item>
  </channel>
</rss>

