<?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: Calculate average sku sold per month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-sku-sold-per-month/m-p/2998889#M101161</link>
    <description>&lt;P&gt;It is safest to build a star schema rather than one flat table. You want to add a proper date table, marked as a date table, and you should also have a separate table for your SKUs, which you could create like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SKU Table = SUMMARIZE('Table', 'Table'[SKU], 'Table'[Item name])&lt;/LI-CODE&gt;
&lt;P&gt;Link both the SKU table and the date table in one-to-many relationships to your fact table, and always use&amp;nbsp; columns from these tables on your visuals and in filters and slicers.&lt;/P&gt;
&lt;P&gt;You can then create a measure to show the average quantity like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Avg Quantity = AVERAGE('Table'[Quantity])&lt;/LI-CODE&gt;
&lt;P&gt;You can put this measure into visuals with columns from your SKU and date tables and it will show you the averages broken down by whatever you choose.&lt;/P&gt;</description>
    <pubDate>Tue, 03 Jan 2023 15:15:17 GMT</pubDate>
    <dc:creator>johnt75</dc:creator>
    <dc:date>2023-01-03T15:15:17Z</dc:date>
    <item>
      <title>Calculate average sku sold per month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-sku-sold-per-month/m-p/2998854#M101154</link>
      <description>&lt;P&gt;I have tried to search for other topics regarding this problem, but can't seem to get any of them to work.&lt;/P&gt;&lt;P&gt;I want to find the average amount of units sold per month per SKU in my DATA table.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This is my table&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;And this is some of the data&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do anyone has a smart way to do this?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2023 14:55:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-sku-sold-per-month/m-p/2998854#M101154</guid>
      <dc:creator>RVBIBS</dc:creator>
      <dc:date>2023-01-03T14:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate average sku sold per month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-sku-sold-per-month/m-p/2998889#M101161</link>
      <description>&lt;P&gt;It is safest to build a star schema rather than one flat table. You want to add a proper date table, marked as a date table, and you should also have a separate table for your SKUs, which you could create like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SKU Table = SUMMARIZE('Table', 'Table'[SKU], 'Table'[Item name])&lt;/LI-CODE&gt;
&lt;P&gt;Link both the SKU table and the date table in one-to-many relationships to your fact table, and always use&amp;nbsp; columns from these tables on your visuals and in filters and slicers.&lt;/P&gt;
&lt;P&gt;You can then create a measure to show the average quantity like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Avg Quantity = AVERAGE('Table'[Quantity])&lt;/LI-CODE&gt;
&lt;P&gt;You can put this measure into visuals with columns from your SKU and date tables and it will show you the averages broken down by whatever you choose.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2023 15:15:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-sku-sold-per-month/m-p/2998889#M101161</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-01-03T15:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate average sku sold per month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-sku-sold-per-month/m-p/2998944#M101171</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="493651" data-lia-user-login="RVBIBS" class="lia-mention lia-mention-user"&gt;RVBIBS&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try to&lt;/P&gt;&lt;P&gt;1) add column with this:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;YYMM = &lt;/SPAN&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"YYYYMM"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;2) write a measure like this:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;AvgByMonthBySKU = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;_table&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUMMARIZE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;data&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;data&lt;/SPAN&gt;&lt;SPAN&gt;[YYMM]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;data&lt;/SPAN&gt;&lt;SPAN&gt;[SKU]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&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;DIVIDE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;data&lt;/SPAN&gt;&lt;SPAN&gt;[Sales]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;_table&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;i tried to verify with a simplified sample, it worked like this:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 03 Jan 2023 15:47:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-sku-sold-per-month/m-p/2998944#M101171</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-01-03T15:47:20Z</dc:date>
    </item>
  </channel>
</rss>

