<?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: Help with calculating cumulative change and % in Power BI with multiple months selected in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-calculating-cumulative-change-and-in-Power-BI-with/m-p/4337924#M172245</link>
    <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="807937" data-lia-user-login="Muska_Sukhija" class="lia-mention lia-mention-user"&gt;Muska_Sukhija&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Based on the description, creating the new table to calcualte average count.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table 2 = 
SUMMARIZE(
    'Table',
    'Table'[Year],
    "AvgHecount", AVERAGE('Table'[Headcount])
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then, creating the index column in power query.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Creating new column to calculate the change.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Change in preivous year = IF('Table 2'[Index] = 1, 0, [AvgHecount] - LOOKUPVALUE('Table 2'[AvgHecount], [Index], [Index] - 1))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Creating the new measure to calculate cumulative change.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Cumulative change = 
CALCULATE(
    SUM('Table 2'[Change in preivous year]),
    FILTER(ALL('Table 2'), 'Table 2'[Index] &amp;lt;= MAX('Table 2'[Index])
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Besides, creating the new measure to calucalte %cumulative change and change the percentage format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Cumulative change% = [Cumulative change] / 100&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;What's more, if you want to calculate cumulative, you need to use sum function.&amp;nbsp;If you select multiple months, power bi cannot dynamically generate calculated columns based on slicer values. There would be no way to calculate the cumulative.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/PowerBI-Cumulative-Total-by-Month-within-Year-Financial-Year/m-p/509703" target="_blank" rel="noopener"&gt;Solved: PowerBI Cumulative Total by Month within Year (Fin... - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Power-BI-Community-Blog/How-to-Calculate-Cumulative-Values-with-DAX/ba-p/2835970" target="_blank" rel="noopener"&gt;How to Calculate Cumulative Values with DAX - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/Cumulative-sum-of-a-column/m-p/427424" target="_blank" rel="noopener"&gt;Solved: Cumulative sum of a column - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Wisdom Wu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this 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;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Dec 2024 08:03:54 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-12-30T08:03:54Z</dc:date>
    <item>
      <title>Help with calculating cumulative change and % in Power BI with multiple months selected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-calculating-cumulative-change-and-in-Power-BI-with/m-p/4337397#M172230</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I am working on a Power BI dashboard with &lt;STRONG&gt;headcount data and NOT SALES&lt;/STRONG&gt;, and I need help calculating cumulative change and cumulative % change when multiple months are selected in the slicer.&lt;/P&gt;&lt;P&gt;Here’s a sample of the data:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dataset contains daily headcount data from 2019 to 2024.&lt;/P&gt;&lt;H3&gt;Problem Statement:&lt;/H3&gt;&lt;P&gt;I want to create a table matrix like this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The table should show the cumulative change and cumulative % change, where the data is based on average headcount, and the slicer allows the selection of multiple months. I already have a measure to calculate average headcount when multiple months are selected.&lt;/P&gt;&lt;H3&gt;Question:&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;How can I calculate the cumulative change and cumulative % change when selecting multiple months in the slicer?&lt;/LI&gt;&lt;LI&gt;What DAX measures would be needed to achieve this?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Any insights or advice would be greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2024 17:11:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-calculating-cumulative-change-and-in-Power-BI-with/m-p/4337397#M172230</guid>
      <dc:creator>Muska_Sukhija</dc:creator>
      <dc:date>2024-12-19T17:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: Help with calculating cumulative change and % in Power BI with multiple months selected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-calculating-cumulative-change-and-in-Power-BI-with/m-p/4337924#M172245</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="807937" data-lia-user-login="Muska_Sukhija" class="lia-mention lia-mention-user"&gt;Muska_Sukhija&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Based on the description, creating the new table to calcualte average count.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table 2 = 
SUMMARIZE(
    'Table',
    'Table'[Year],
    "AvgHecount", AVERAGE('Table'[Headcount])
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then, creating the index column in power query.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Creating new column to calculate the change.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Change in preivous year = IF('Table 2'[Index] = 1, 0, [AvgHecount] - LOOKUPVALUE('Table 2'[AvgHecount], [Index], [Index] - 1))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Creating the new measure to calculate cumulative change.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Cumulative change = 
CALCULATE(
    SUM('Table 2'[Change in preivous year]),
    FILTER(ALL('Table 2'), 'Table 2'[Index] &amp;lt;= MAX('Table 2'[Index])
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Besides, creating the new measure to calucalte %cumulative change and change the percentage format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Cumulative change% = [Cumulative change] / 100&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;What's more, if you want to calculate cumulative, you need to use sum function.&amp;nbsp;If you select multiple months, power bi cannot dynamically generate calculated columns based on slicer values. There would be no way to calculate the cumulative.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/PowerBI-Cumulative-Total-by-Month-within-Year-Financial-Year/m-p/509703" target="_blank" rel="noopener"&gt;Solved: PowerBI Cumulative Total by Month within Year (Fin... - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Power-BI-Community-Blog/How-to-Calculate-Cumulative-Values-with-DAX/ba-p/2835970" target="_blank" rel="noopener"&gt;How to Calculate Cumulative Values with DAX - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/Cumulative-sum-of-a-column/m-p/427424" target="_blank" rel="noopener"&gt;Solved: Cumulative sum of a column - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Wisdom Wu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this 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;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2024 08:03:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-calculating-cumulative-change-and-in-Power-BI-with/m-p/4337924#M172245</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-12-30T08:03:54Z</dc:date>
    </item>
  </channel>
</rss>

