<?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: Year over year % Change in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Year-over-year-Change/m-p/3642719#M141029</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="674884" data-lia-user-login="jasmeet_ia" class="lia-mention lia-mention-user"&gt;jasmeet_ia&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;Good share!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For your question, here is the method I provided:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's some dummy data&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"Data"&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can create a measure&amp;nbsp;to calculate the year over year change in price.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
    var current_year = SELECTEDVALUE('Data'[2023])
    var last_year = SELECTEDVALUE('Data'[2022])
RETURN DIVIDE(current_year - last_year, last_year)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Change the format of measure to “%”&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the result&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Nono Chen&lt;/P&gt;
&lt;P&gt;If this &lt;STRONG&gt;&lt;EM&gt;post&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;helps, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jan 2024 06:25:52 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-01-17T06:25:52Z</dc:date>
    <item>
      <title>Year over year % Change</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Year-over-year-Change/m-p/3639356#M140871</link>
      <description>&lt;P&gt;Hi there, I am new to powerbi and struggling with this. From the table I have added 'Country' as Rows and 'Year' as column.&amp;nbsp; I am trying to add a column next to 2023, showing % change in 2023 and 2022. I request help with this, as I am not able to figure this out on my own. Please!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2024 17:52:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Year-over-year-Change/m-p/3639356#M140871</guid>
      <dc:creator>jasmeet_ia</dc:creator>
      <dc:date>2024-01-15T17:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Year over year % Change</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Year-over-year-Change/m-p/3639359#M140872</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="674884" data-lia-user-login="jasmeet_ia" class="lia-mention lia-mention-user"&gt;jasmeet_ia&lt;/a&gt;&amp;nbsp;You can create a PY measure like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;NC Intenet Sales (PY) = 
    VAR __MinPYDate = MIN('Dates'[Prior Year Date])
    VAR __MaxPYDate = MAX('Dates'[Prior Year Date])
    VAR __PYCalendar = CALENDAR(__MinPYDate, __MaxPYDate)
    VAR __Table = 
        SUMMARIZE(
            ALL('FactInternetSales'),
            'FactInternetSales'[OrderDate],
            "__Sales", SUM('FactInternetSales'[SalesAmount]))
    VAR __Result = SUMX( FILTER( __Table, [OrderDate] IN __PYCalendar), [__Sales] )
RETURN
    __Result&lt;/LI-CODE&gt;
&lt;P&gt;&lt;div data-video-id="https://youtu.be/rOpwLzplUVI" data-video-remote-vid="https://youtu.be/rOpwLzplUVI" class="lia-video-container lia-media-is-center lia-media-size-medium"&gt;&lt;iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FrOpwLzplUVI%3Ffeature%3Doembed&amp;amp;display_name=YouTube&amp;amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DrOpwLzplUVI&amp;amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FrOpwLzplUVI%2Fhqdefault.jpg&amp;amp;type=text%2Fhtml&amp;amp;schema=youtube" allowfullscreen="" style="max-width: 100%"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This may also help,&amp;nbsp;You may find this helpful - &lt;A href="https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008" target="_blank"&gt;https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;div data-video-id="https://youtu.be/nUZPk7lpe_Q" data-video-remote-vid="https://youtu.be/nUZPk7lpe_Q" class="lia-video-container lia-media-is-center lia-media-size-medium"&gt;&lt;iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FnUZPk7lpe_Q%3Ffeature%3Doembed&amp;amp;display_name=YouTube&amp;amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DnUZPk7lpe_Q&amp;amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FnUZPk7lpe_Q%2Fhqdefault.jpg&amp;amp;type=text%2Fhtml&amp;amp;schema=youtube" allowfullscreen="" style="max-width: 100%"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2024 17:58:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Year-over-year-Change/m-p/3639359#M140872</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-01-15T17:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: Year over year % Change</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Year-over-year-Change/m-p/3642719#M141029</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="674884" data-lia-user-login="jasmeet_ia" class="lia-mention lia-mention-user"&gt;jasmeet_ia&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;Good share!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For your question, here is the method I provided:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's some dummy data&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"Data"&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can create a measure&amp;nbsp;to calculate the year over year change in price.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
    var current_year = SELECTEDVALUE('Data'[2023])
    var last_year = SELECTEDVALUE('Data'[2022])
RETURN DIVIDE(current_year - last_year, last_year)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Change the format of measure to “%”&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the result&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Nono Chen&lt;/P&gt;
&lt;P&gt;If this &lt;STRONG&gt;&lt;EM&gt;post&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;helps, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 06:25:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Year-over-year-Change/m-p/3642719#M141029</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-17T06:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Year over year % Change</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Year-over-year-Change/m-p/3644166#M141105</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;- Thanks for your suggestion. But I am still not able to achilve what I looking for. Let me rephrase my question, maybe I was not very clear previously.. I really appreciate your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is how my raw data looks like, with more rows:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Month&lt;/TD&gt;&lt;TD&gt;READER LOCATION&lt;/TD&gt;&lt;TD&gt;Reads&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jan-20&lt;/TD&gt;&lt;TD&gt;Canada&lt;/TD&gt;&lt;TD&gt;1,293,579&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jan-20&lt;/TD&gt;&lt;TD&gt;United States&lt;/TD&gt;&lt;TD&gt;1,253,969&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jan-20&lt;/TD&gt;&lt;TD&gt;India&lt;/TD&gt;&lt;TD&gt;353,493&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Feb-20&lt;/TD&gt;&lt;TD&gt;France&lt;/TD&gt;&lt;TD&gt;349,513&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Mar-20&lt;/TD&gt;&lt;TD&gt;United Kingdom&lt;/TD&gt;&lt;TD&gt;289,964&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jan-21&lt;/TD&gt;&lt;TD&gt;Australia&lt;/TD&gt;&lt;TD&gt;181,488&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jan-22&lt;/TD&gt;&lt;TD&gt;Brazil&lt;/TD&gt;&lt;TD&gt;130,479&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jan-23&lt;/TD&gt;&lt;TD&gt;South Africa&lt;/TD&gt;&lt;TD&gt;77,071&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and this is what I want to achieve in one of my dashboards:&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;</description>
      <pubDate>Wed, 17 Jan 2024 18:55:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Year-over-year-Change/m-p/3644166#M141105</guid>
      <dc:creator>jasmeet_ia</dc:creator>
      <dc:date>2024-01-17T18:55:57Z</dc:date>
    </item>
  </channel>
</rss>

