<?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 % Growth change on the basis of Selected Period in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Growth-change-on-the-basis-of-Selected-Period/m-p/4058497#M161083</link>
    <description>&lt;P&gt;You might want to share a bit more about your model, are you using a date dimension?&lt;BR /&gt;At any rate, you will need some column in a year-quarter format to be able to determine the previous selected quarter.&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jul 2024 09:03:59 GMT</pubDate>
    <dc:creator>sjoerdvn</dc:creator>
    <dc:date>2024-07-24T09:03:59Z</dc:date>
    <item>
      <title>Calculate % Growth change on the basis of Selected Period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Growth-change-on-the-basis-of-Selected-Period/m-p/4058371#M161076</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am struggling to find the soultion for the below problem statement.&amp;nbsp;I have to create a&amp;nbsp;&lt;SPAN&gt;&lt;SPAN class=""&gt;measure to calculate the %change from&amp;nbsp;&lt;STRONG&gt;selected&lt;/STRONG&gt;&amp;nbsp;quarter range. For example, we have data of 2023 from each month with salesDate.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/6614" target="_blank"&gt;@Greg&lt;/A&gt;&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/81111" target="_blank"&gt;@HotChilli&lt;/A&gt;&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/5580" target="_blank"&gt;@bhanu&lt;/A&gt;&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/625922" target="_blank"&gt;@bhanu_gautam&lt;/A&gt;&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/100342" target="_blank"&gt;@lbendlin&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/490030" target="_blank"&gt;@Irwan&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 08:20:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Growth-change-on-the-basis-of-Selected-Period/m-p/4058371#M161076</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-24T08:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate % Growth change on the basis of Selected Period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Growth-change-on-the-basis-of-Selected-Period/m-p/4058426#M161079</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;, First create a measure&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Total Sales Amount = &lt;BR /&gt;SUM('Sales'[SalesAmount])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Than create one more measure for percentage change&lt;/P&gt;
&lt;P&gt;% Change = &lt;BR /&gt;VAR SelectedQuarters = VALUES('Sales'[Quarter-Year])&lt;BR /&gt;VAR FirstQuarter = MINX(SelectedQuarters, [Quarter-Year])&lt;BR /&gt;VAR PreviousQuarterSales = &lt;BR /&gt;CALCULATE(&lt;BR /&gt;[Total Sales Amount],&lt;BR /&gt;FILTER(&lt;BR /&gt;ALL('Sales'),&lt;BR /&gt;'Sales'[Quarter-Year] = FirstQuarter&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;IF(&lt;BR /&gt;ISBLANK(PreviousQuarterSales),&lt;BR /&gt;0,&lt;BR /&gt;DIVIDE(&lt;BR /&gt;[Total Sales Amount] - PreviousQuarterSales,&lt;BR /&gt;PreviousQuarterSales,&lt;BR /&gt;0&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add quarter year file&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 08:34:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Growth-change-on-the-basis-of-Selected-Period/m-p/4058426#M161079</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2024-07-24T08:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate % Growth change on the basis of Selected Period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Growth-change-on-the-basis-of-Selected-Period/m-p/4058497#M161083</link>
      <description>&lt;P&gt;You might want to share a bit more about your model, are you using a date dimension?&lt;BR /&gt;At any rate, you will need some column in a year-quarter format to be able to determine the previous selected quarter.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 09:03:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Growth-change-on-the-basis-of-Selected-Period/m-p/4058497#M161083</guid>
      <dc:creator>sjoerdvn</dc:creator>
      <dc:date>2024-07-24T09:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate % Growth change on the basis of Selected Period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Growth-change-on-the-basis-of-Selected-Period/m-p/4058541#M161085</link>
      <description>&lt;P&gt;Hi Bhanu,&lt;/P&gt;&lt;P&gt;Thanks for reply but it is not working. I am getting 0.0% for all the selected quarters.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 09:16:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Growth-change-on-the-basis-of-Selected-Period/m-p/4058541#M161085</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-24T09:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate % Growth change on the basis of Selected Period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Growth-change-on-the-basis-of-Selected-Period/m-p/4058722#M161091</link>
      <description>&lt;P&gt;% Change = &lt;BR /&gt;VAR SelectedQuarters = VALUES('Table'[Quarter-Year])&lt;BR /&gt;VAR CurrentQuarter = SELECTEDVALUE('Table'[Quarter-Year])&lt;BR /&gt;VAR PreviousQuarter = &lt;BR /&gt;CALCULATE(&lt;BR /&gt;MAX('Table'[Quarter-Year]),&lt;BR /&gt;FILTER(&lt;BR /&gt;ALL('Table'),&lt;BR /&gt;'Table'[Quarter-Year] &amp;lt; CurrentQuarter &amp;amp;&amp;amp;&lt;BR /&gt;'Table'[Quarter-Year] IN SelectedQuarters&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;VAR PreviousQuarterSales = &lt;BR /&gt;CALCULATE(&lt;BR /&gt;[Total SalesAmount],&lt;BR /&gt;'Table'[Quarter-Year] = PreviousQuarter&lt;BR /&gt;)&lt;BR /&gt;VAR CurrentQuarterSales = [Total SalesAmount]&lt;BR /&gt;VAR PercentageChange = &lt;BR /&gt;IF(&lt;BR /&gt;ISBLANK(PreviousQuarterSales),&lt;BR /&gt;BLANK(),&lt;BR /&gt;DIVIDE(CurrentQuarterSales - PreviousQuarterSales, PreviousQuarterSales, 0)&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;IF(&lt;BR /&gt;ISBLANK(PreviousQuarter),&lt;BR /&gt;0,&lt;BR /&gt;PercentageChange&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 10:13:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Growth-change-on-the-basis-of-Selected-Period/m-p/4058722#M161091</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2024-07-24T10:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate % Growth change on the basis of Selected Period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Growth-change-on-the-basis-of-Selected-Period/m-p/4060803#M161185</link>
      <description>&lt;P&gt;Is this what you are looking for ?&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 07:52:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Growth-change-on-the-basis-of-Selected-Period/m-p/4060803#M161185</guid>
      <dc:creator>SachinNandanwar</dc:creator>
      <dc:date>2024-07-25T07:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate % Growth change on the basis of Selected Period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Growth-change-on-the-basis-of-Selected-Period/m-p/4066539#M161430</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, here are my steps you can follow as a solution.&lt;/P&gt;
&lt;P&gt;(1) My test data is the same as yours.&lt;/P&gt;
&lt;P&gt;(2) We can create measures.&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rank = RANKX(ALLSELECTED('Table'[Quarter-Year]),[Quarter-Year],MAX('Table'[Quarter-Year]),ASC)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;% Change = var a=[Rank]-1
var b=CALCULATE(SUM('Table'[Sales  Amount]),FILTER(ALLSELECTED('Table'),[Rank]=a))  
var c=SUM('Table'[Sales  Amount])
RETURN  DIVIDE(c-b,b,0)&lt;/LI-CODE&gt;
&lt;P&gt;(3) Then the result is as follows.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 08:14:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Growth-change-on-the-basis-of-Selected-Period/m-p/4066539#M161430</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-29T08:14:21Z</dc:date>
    </item>
  </channel>
</rss>

