<?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: Getting the increased or decreased value for Month Year column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-increased-or-decreased-value-for-Month-Year-column/m-p/4347556#M172664</link>
    <description>&lt;P&gt;Thanks Evreyone, got the solution for above answers.&lt;/P&gt;</description>
    <pubDate>Wed, 01 Jan 2025 04:09:42 GMT</pubDate>
    <dc:creator>jswamy</dc:creator>
    <dc:date>2025-01-01T04:09:42Z</dc:date>
    <item>
      <title>Getting the increased or decreased value for Month Year column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-increased-or-decreased-value-for-Month-Year-column/m-p/4343146#M172451</link>
      <description>&lt;P&gt;Hello Team,&lt;BR /&gt;&lt;BR /&gt;I need a help with dax that Need to get&amp;nbsp; increased or decreased sales count for a year month column.&lt;BR /&gt;&lt;BR /&gt;If i select 2024 in slicer&lt;BR /&gt;Ex: 2024 Jan = 150&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 2024 Feb= 450&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 2024 Mar = 600 So, If i drag the visual and placed the measure and column the view will be like this.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Current Visual View :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;But What i want here is need to get increased or decreased value. for ex 2023 Dec 100 sales is there and 2024 jan is having 150 sales So, 50 sales increased, Need to show 2024 Jan as 50 Sales and Feb is having 450 sales.. so from Jan to Feb it increased&amp;nbsp;&lt;STRONG&gt;300&lt;/STRONG&gt; sales has increased so, i need to show in &lt;STRONG&gt;2024 Feb as 300&lt;/STRONG&gt;... same for Mar, now its showing 550, from Feb to Mar it increased 100.. for Mar, need to show &lt;STRONG&gt;100&lt;/STRONG&gt;. and so on...&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;EXPECTED OUTPUT:&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;Please anyone help me with dax.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2024 04:04:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-increased-or-decreased-value-for-Month-Year-column/m-p/4343146#M172451</guid>
      <dc:creator>jswamy</dc:creator>
      <dc:date>2024-12-26T04:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the increased or decreased value for Month Year column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-increased-or-decreased-value-for-Month-Year-column/m-p/4343176#M172453</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I tried to create a sample pbix file like below, and please check the below picture and the attached pbix file.&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;
&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;&lt;A href="https://learn.microsoft.com/en-us/dax/offset-function-dax?wt.mc_id=DP-MVP-5004989" target="_blank"&gt;OFFSET function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;expected result measure: =
VAR _currentyearmonth =
    SUM ( sales[sales] )
VAR _previousyearmonth =
    CALCULATE (
        SUM ( sales[sales] ),
        OFFSET (
            -1,
            ALL ( 'calendar'[Year], 'calendar'[Year-Month], 'calendar'[Year-Month sort] ),
            ORDERBY ( 'calendar'[Year-Month sort], ASC )
        )
    )
RETURN
    _currentyearmonth - _previousyearmonth
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2024 04:40:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-increased-or-decreased-value-for-Month-Year-column/m-p/4343176#M172453</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2024-12-26T04:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the increased or decreased value for Month Year column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-increased-or-decreased-value-for-Month-Year-column/m-p/4343206#M172454</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="867893" data-lia-user-login="jswamy" class="lia-mention lia-mention-user"&gt;jswamy&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;first create a measure of total sales&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;total_sales = SUM(Sales[SalesAmount])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and second you can try this measure to create month of month diff&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;month diff = 

var previous_month = CALCULATE([total_sales],PREVIOUSMONTH('Calendar 2'[DateKey]))

RETURN
[total_sales] - previous_month&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;SPAN&gt;, then please consider&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2024 05:37:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-increased-or-decreased-value-for-Month-Year-column/m-p/4343206#M172454</guid>
      <dc:creator>vivek31</dc:creator>
      <dc:date>2024-12-26T05:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the increased or decreased value for Month Year column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-increased-or-decreased-value-for-Month-Year-column/m-p/4343313#M172455</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="867893" data-lia-user-login="jswamy" class="lia-mention lia-mention-user"&gt;jswamy&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thanks for the reply from&amp;nbsp;Jihwan_Kim and vivek31.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To compare the sales with the previous month, please check the following points:&lt;/P&gt;&lt;P&gt;1. This is my sample data:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Add a measure named Output and write the DAX as below:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Output=
VAR _currentYear =
    YEAR ( MAX ( 'SalesData'[Date] ) )
VAR _currentMonth =
    MONTH ( MAX ( 'SalesData'[Date] ) )
VAR _previousSales =
    CALCULATE (
        SUM ( SalesData[Sales] ),
        FILTER (
            ALL ( SalesData ),
            'SalesData'[Date]
                &amp;gt;= DATE ( _currentYear, _currentMonth - 1, 1 )
                &amp;amp;&amp;amp; 'SalesData'[Date] &amp;lt; DATE ( _currentYear, _currentMonth, 1 )
        )
    )
RETURN
    SUM ( SalesData[Sales] ) - _previousSales&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Here is the final testing result:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please feel free to contact if there is any problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Qi&lt;BR /&gt;Community Support Team&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If there is any 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;&amp;nbsp;to help the other members find it more quickly.&lt;BR /&gt;If I misunderstand your needs or you still have problems on it, please feel free to let us know.&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Thanks a lot!&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2024 07:10:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-increased-or-decreased-value-for-Month-Year-column/m-p/4343313#M172455</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-12-26T07:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the increased or decreased value for Month Year column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-increased-or-decreased-value-for-Month-Year-column/m-p/4347556#M172664</link>
      <description>&lt;P&gt;Thanks Evreyone, got the solution for above answers.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jan 2025 04:09:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-increased-or-decreased-value-for-Month-Year-column/m-p/4347556#M172664</guid>
      <dc:creator>jswamy</dc:creator>
      <dc:date>2025-01-01T04:09:42Z</dc:date>
    </item>
  </channel>
</rss>

