<?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 sell with DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-sell-with-DAX/m-p/4074992#M161786</link>
    <description>&lt;P&gt;Hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Access denied on the data&lt;BR /&gt;&lt;BR /&gt;Before you can calculate you will need to clean the customer and product categories in Systems A &amp;amp; B, so that they match on both tables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The next step would be to build you data model in a Star Schema (Link in my Bio) This means creating a table with just Customer Names and IDs and a table with Just Product names and ID. You will also need a Date Table (Link in my Bio)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Follw the Star Schema instructions, then you can start on your measures&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To create a Sales measure&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total Sales = SUM('TableB'[Amount])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get MoM you can use one measure, but for clarity, let's break it down.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sales MTD = TOTALMTD({Total Sales], 'Calendar'[Date]) ///use the previous measure Total Sales&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ou will need the previous month's value to calculate MoM&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sales PM = 
CALCULATE(
   [Sales MTD],
     DATEADD('Calendar'[Date], -1, MONTH)
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MoM %&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MoM % = 
VAR _Diff = [Sales MTD] - [Sales PM]
RETURN
DIVIDE( _Diff, [Sales PM],0)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;convert then to %&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Last 3 Months&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sales L3M =
CALCULATE (
    [Total Sales],
    DATESINPERIOD ( 'DIM Date'[Date], 
    MAX ( 'Calendar'[Date] ), -3, MONTH )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps&lt;/P&gt;
&lt;P&gt;Joe&lt;/P&gt;</description>
    <pubDate>Fri, 02 Aug 2024 04:48:55 GMT</pubDate>
    <dc:creator>Joe_Barry</dc:creator>
    <dc:date>2024-08-02T04:48:55Z</dc:date>
    <item>
      <title>Calculate sell with DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-sell-with-DAX/m-p/4074983#M161784</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have some problem with the data setting. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have two excel files, one is inventory report downloaded from System A, which only updates the last day of each month. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Another is purchase data downloaded from System B which updates by weekly. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I need to use the inventory and the purchase data to calculate the sales for all customers (using the end-of-month inventory as the starting point, initial inventory + purchases - ending inventory = sales). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The customers and product categories in Systems A and B are not completely the same, but my sales need to cover all customers and products from both systems.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;* the data links as below&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://1drv.ms/f/c/8122f38c2b712de8/EmG3_hi5YQlFsfOPiBNmzO4BX5FtTAviFeLh-BgH_nFD8g?e=BHWW07" target="_blank"&gt;https://1drv.ms/f/c/8122f38c2b712de8/EmG3_hi5YQlFsfOPiBNmzO4BX5FtTAviFeLh-BgH_nFD8g?e=BHWW07&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*How can I caculate&amp;nbsp;&lt;SPAN&gt;every customers every SKU sales&amp;nbsp;&lt;STRONG&gt;by month&lt;/STRONG&gt;?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;*How can I&amp;nbsp;caculate&amp;nbsp;every customers every SKU sales&amp;nbsp;&lt;STRONG&gt;by MOM &amp;amp; P3M&lt;/STRONG&gt;?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thanks in advance!!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2024 04:31:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-sell-with-DAX/m-p/4074983#M161784</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-02T04:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate sell with DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-sell-with-DAX/m-p/4074992#M161786</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Access denied on the data&lt;BR /&gt;&lt;BR /&gt;Before you can calculate you will need to clean the customer and product categories in Systems A &amp;amp; B, so that they match on both tables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The next step would be to build you data model in a Star Schema (Link in my Bio) This means creating a table with just Customer Names and IDs and a table with Just Product names and ID. You will also need a Date Table (Link in my Bio)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Follw the Star Schema instructions, then you can start on your measures&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To create a Sales measure&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total Sales = SUM('TableB'[Amount])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get MoM you can use one measure, but for clarity, let's break it down.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sales MTD = TOTALMTD({Total Sales], 'Calendar'[Date]) ///use the previous measure Total Sales&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ou will need the previous month's value to calculate MoM&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sales PM = 
CALCULATE(
   [Sales MTD],
     DATEADD('Calendar'[Date], -1, MONTH)
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MoM %&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MoM % = 
VAR _Diff = [Sales MTD] - [Sales PM]
RETURN
DIVIDE( _Diff, [Sales PM],0)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;convert then to %&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Last 3 Months&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sales L3M =
CALCULATE (
    [Total Sales],
    DATESINPERIOD ( 'DIM Date'[Date], 
    MAX ( 'Calendar'[Date] ), -3, MONTH )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps&lt;/P&gt;
&lt;P&gt;Joe&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2024 04:48:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-sell-with-DAX/m-p/4074992#M161786</guid>
      <dc:creator>Joe_Barry</dc:creator>
      <dc:date>2024-08-02T04:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate sell with DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-sell-with-DAX/m-p/4075097#M161790</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="707963" data-lia-user-login="Joe_Barry" class="lia-mention lia-mention-user"&gt;Joe_Barry&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks Joe.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please check if the links below is work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://onedrive.live.com/?redeem=aHR0cHM6Ly8xZHJ2Lm1zL2YvYy84MTIyZjM4YzJiNzEyZGU4L0VtRzNfaGk1WVFsRnNmT1BpQk5tek80Qlg1RnRUQXZpRmVMaC1CZ0hfbkZEOGc%5FZT1CSFdXMDc&amp;amp;id=8122F38C2B712DE8%21s18feb76161b94509b1f38f881366ccee&amp;amp;cid=8122F38C2B712DE8" target="_self"&gt;https://onedrive.live.com/?redeem=aHR0cHM6Ly8xZHJ2Lm1zL2YvYy84MTIyZjM4YzJiNzEyZGU4L0VtRzNfaGk1WVFsRnNmT1BpQk5tek80Qlg1RnRUQXZpRmVMaC1CZ0hfbkZEOGc%5FZT1CSFdXMDc&amp;amp;id=8122F38C2B712DE8%21s18feb76161b94509b1f38f881366ccee&amp;amp;cid=8122F38C2B712DE8&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2024 05:38:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-sell-with-DAX/m-p/4075097#M161790</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-02T05:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate sell with DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-sell-with-DAX/m-p/4075224#M161795</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have attached the PBIX.&lt;BR /&gt;&lt;BR /&gt;I made some adaptions by creating dimension tables. Some of the calculated columns and Dimension tables I would have created in Power Query.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Joe&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2024 06:31:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-sell-with-DAX/m-p/4075224#M161795</guid>
      <dc:creator>Joe_Barry</dc:creator>
      <dc:date>2024-08-02T06:31:13Z</dc:date>
    </item>
  </channel>
</rss>

