<?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: DAX to calculate rolling percentage of change in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-calculate-rolling-percentage-of-change/m-p/3365377#M126541</link>
    <description>&lt;P&gt;Thank you, everyone,&lt;/P&gt;&lt;P&gt;I believe I have found a different way to achieve this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I first created a measure to show me this year's number in this manner: Service Hours = CALCULATE(SUM(D365[Hours]),FILTER('Date','Date'[Date]))&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I then created a measure to show me the previous year's number: Previous Year Service Hours = CALCULATE(SUM(D365[Hours]),SAMEPERIODLASTYEAR('Date'[Date]))&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I then created a measure like this to calculate the percentage of change: Service Hours % of Change = IF(([Service Hours]/[Previus Year Service Hours]-1) = -1,BLANK(),IFERROR(([Service Hours]/[Previus Year Service Hours]-1), BLANK()))&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Aug 2023 11:54:48 GMT</pubDate>
    <dc:creator>Don_P</dc:creator>
    <dc:date>2023-08-04T11:54:48Z</dc:date>
    <item>
      <title>DAX to calculate rolling percentage of change</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-calculate-rolling-percentage-of-change/m-p/3351634#M125860</link>
      <description>&lt;P&gt;I have created a DAX measure that shows me a rolling total over time:&lt;/P&gt;&lt;DIV&gt;&l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&lt;P&gt;I would like to add a new column that shows the percentage of change between years over time and I have not been able to figure this out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Don Price&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 26 Jul 2023 17:29:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-calculate-rolling-percentage-of-change/m-p/3351634#M125860</guid>
      <dc:creator>Don_P</dc:creator>
      <dc:date>2023-07-26T17:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: DAX to calculate rolling percentage of change</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-calculate-rolling-percentage-of-change/m-p/3355049#M126046</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="89106" data-lia-user-login="Don_P" class="lia-mention lia-mention-user"&gt;Don_P&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;You can refer the following links to get it:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://monocroft.com/calculating-percentage-change-in-power-bi-a-guide/" target="_blank"&gt;Calculating Percentage Change in Power BI - A Guide - Monocroft [0492-9f27-475-7563]&lt;/A&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;YTD Sales = TOTALYTD(SUM(Sales[Amount]), 'Calendar'[Date])

YTD % Change =
DIVIDE (
    [YTD Sales]
        - CALCULATE ( [YTD Sales], DATEADD ( 'Calendar'[Date], -12, MONTH ) ),
    CALCULATE ( [YTD Sales], DATEADD ( 'Calendar'[Date], -12, MONTH ) )
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=6vJIAJNTdG0" target="_blank"&gt;Power BI Year-Over-Year Growth % Calculations [DAX] - YouTube&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If the above one can't help you, please provide some&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;raw data&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;in your tables&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;exclude&amp;nbsp;sensitive&amp;nbsp;data&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;) with&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Text&lt;/STRONG&gt;&amp;nbsp;&lt;/FONT&gt;&lt;SPAN&gt;format&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;and your&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;expected result&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-provide-sample-data-in-the-Power-BI-Forum%2Fba-p%2F963216&amp;amp;data=05%7C01%7CClaire.Dong%40microsoft.com%7Cada9149bd91546a8432508dacd31ef9b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638047911607737134%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=EJlYfclgtrjgAEYj9Uo1AauqxaQm3hlQsjJMo4zCY1M%3D&amp;amp;reserved=0" target="_blank" rel="nofollow noopener noreferrer"&gt;How to provide sample data in the Power BI Forum&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And&amp;nbsp;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;It is better&lt;/STRONG&gt;&lt;/FONT&gt;&amp;nbsp;if you can share a&amp;nbsp;&lt;FONT color="#008000"&gt;&lt;STRONG&gt;simplified&lt;/STRONG&gt;&amp;nbsp;&lt;/FONT&gt;pbix file. You can refer the following link to upload the file to the community. Thank you.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FDesktop%2FHow-to-upload-PBI-in-Community%2Fm-p%2F1672886&amp;amp;data=04%7C01%7Cv-yiruan%40microsoft.com%7C4f580813734d4a8355b008da16f6e91a%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637847547341062885%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;amp;sdata=YJvujige2YITXKbKED9JieQm5LBdf%2F3IYPM4ggdiijQ%3D&amp;amp;reserved=0" target="_blank" rel="nofollow noopener noreferrer"&gt;How to upload PBI in Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2023 09:06:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-calculate-rolling-percentage-of-change/m-p/3355049#M126046</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-28T09:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: DAX to calculate rolling percentage of change</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-calculate-rolling-percentage-of-change/m-p/3365377#M126541</link>
      <description>&lt;P&gt;Thank you, everyone,&lt;/P&gt;&lt;P&gt;I believe I have found a different way to achieve this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I first created a measure to show me this year's number in this manner: Service Hours = CALCULATE(SUM(D365[Hours]),FILTER('Date','Date'[Date]))&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I then created a measure to show me the previous year's number: Previous Year Service Hours = CALCULATE(SUM(D365[Hours]),SAMEPERIODLASTYEAR('Date'[Date]))&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I then created a measure like this to calculate the percentage of change: Service Hours % of Change = IF(([Service Hours]/[Previus Year Service Hours]-1) = -1,BLANK(),IFERROR(([Service Hours]/[Previus Year Service Hours]-1), BLANK()))&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 11:54:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-to-calculate-rolling-percentage-of-change/m-p/3365377#M126541</guid>
      <dc:creator>Don_P</dc:creator>
      <dc:date>2023-08-04T11:54:48Z</dc:date>
    </item>
  </channel>
</rss>

