<?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: Average Basket for a list of items in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Basket-for-a-list-of-items/m-p/1611478#M32388</link>
    <description>&lt;P&gt;Sorry, here's the link&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google" target="_blank"&gt;https://drive.google&lt;/A&gt;.com/file/d/1bu0xuA4qcpLq3HkJ6MU79k6RAnU8eO7V/view?usp=sharing&lt;/P&gt;</description>
    <pubDate>Wed, 20 Jan 2021 14:23:14 GMT</pubDate>
    <dc:creator>Mtt_90</dc:creator>
    <dc:date>2021-01-20T14:23:14Z</dc:date>
    <item>
      <title>Average Basket for a list of items</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Basket-for-a-list-of-items/m-p/1602802#M32145</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm new to Power BI and I'm stuck (actually I'm lost) in an operation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have one table:&lt;/P&gt;&lt;P&gt;1) Sales table that has the following columns: Invoice ID (it records every single transaction, so if someone buys 3 products, there will be three rows and each one will have Invoice-001 as Invoice ID since they are part of the same transaction), quantity, date, $ sales, promotion name column (it will have the name of the promotion if the product is part of it) and product name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to know what is the average basket sales $ when a product is in the basket and what is the average basket sale when there isn't any promoted product in the basket.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Moreover, multiple items can be part of the same promotion. This mean that if I'm using a slicer for products, I should see the average basket for that product, but If I use the "promotion name" as slicer, I should see the average basket $ for that promotion (which can include multiple products)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far, I used this DAX, and it partially works because it gives me the average I need, but when I select a product or a promotion with a slicer, the value will change and will consider only the average for that product ( keeping out all the other products that are in the basket)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IN = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var hasItemTable = CALCULATETABLE(Sales,Sales[Promotions - Location.Promotion Name] &amp;lt;&amp;gt; BLANK())&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DIVIDE(sum(Sales[TotalSales]), COUNTROWS(VALUES('Sales'[InvoicePrintableId]))),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER('Sales', CONTAINS(hasItemTable,Sales[InvoicePrintableId],Sales[InvoicePrintableId])))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I don't know if it is a matter of filter, slicer or dax formula.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Please, let me know if you need other information!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank you so much for the help!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 15 Jan 2021 21:55:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Basket-for-a-list-of-items/m-p/1602802#M32145</guid>
      <dc:creator>Mtt_90</dc:creator>
      <dc:date>2021-01-15T21:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Average Basket for a list of items</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Basket-for-a-list-of-items/m-p/1603355#M32158</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="280481" data-lia-user-login="Mtt_90" class="lia-mention lia-mention-user"&gt;Mtt_90&lt;/a&gt;&amp;nbsp;can you provide some sample data to work with?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Jan 2021 17:20:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Basket-for-a-list-of-items/m-p/1603355#M32158</guid>
      <dc:creator>littlemojopuppy</dc:creator>
      <dc:date>2021-01-16T17:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Average Basket for a list of items</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Basket-for-a-list-of-items/m-p/1609591#M32337</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi, thank you for your reaply.&lt;/P&gt;&lt;P&gt;This is a screenshot of data. Let me know if you need anything else&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 22:29:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Basket-for-a-list-of-items/m-p/1609591#M32337</guid>
      <dc:creator>Mtt_90</dc:creator>
      <dc:date>2021-01-19T22:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Average Basket for a list of items</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Basket-for-a-list-of-items/m-p/1609701#M32343</link>
      <description>&lt;P&gt;I can't work with the data from a picture.&amp;nbsp; Please post some sample data into Google Drive, Dropbox or OneDrive .&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 00:09:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Basket-for-a-list-of-items/m-p/1609701#M32343</guid>
      <dc:creator>littlemojopuppy</dc:creator>
      <dc:date>2021-01-20T00:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: Average Basket for a list of items</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Basket-for-a-list-of-items/m-p/1611478#M32388</link>
      <description>&lt;P&gt;Sorry, here's the link&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google" target="_blank"&gt;https://drive.google&lt;/A&gt;.com/file/d/1bu0xuA4qcpLq3HkJ6MU79k6RAnU8eO7V/view?usp=sharing&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 14:23:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Basket-for-a-list-of-items/m-p/1611478#M32388</guid>
      <dc:creator>Mtt_90</dc:creator>
      <dc:date>2021-01-20T14:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Average Basket for a list of items</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Basket-for-a-list-of-items/m-p/1611479#M32389</link>
      <description>&lt;P&gt;Link to the sample data&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google" target="_blank"&gt;https://drive.google&lt;/A&gt;.com/file/d/1bu0xuA4qcpLq3HkJ6MU79k6RAnU8eO7V/view?usp=sharing&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 14:23:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Basket-for-a-list-of-items/m-p/1611479#M32389</guid>
      <dc:creator>Mtt_90</dc:creator>
      <dc:date>2021-01-20T14:23:33Z</dc:date>
    </item>
  </channel>
</rss>

