<?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: Cumulative change by quarter using ProductX of measure? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-change-by-quarter-using-ProductX-of-measure/m-p/2778937#M86902</link>
    <description>&lt;P&gt;You can't really put SELECTEDVALUE into a CALCULATE.&amp;nbsp; Use variables instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide sanitized sample data that fully covers your issue. &lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Sep 2022 00:09:00 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2022-09-20T00:09:00Z</dc:date>
    <item>
      <title>Cumulative change by quarter using ProductX of measure?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-change-by-quarter-using-ProductX-of-measure/m-p/2776114#M86686</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;SPAN&gt;I have a measure calculating the quarter on quarter unit price changes (call it Measure1). I now want to make another measure (Measure2) that multiplies (1+ values of Measure1) in all quarters up to the selected quarter. Sample data below:&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Year-Quarter&lt;/TD&gt;&lt;TD&gt;Unit Price (Measure1)&lt;/TD&gt;&lt;TD&gt;Measure2 (output)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022 Q1&lt;/TD&gt;&lt;TD&gt;-&lt;/TD&gt;&lt;TD&gt;1+0% = 100%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022 Q2&lt;/TD&gt;&lt;TD&gt;30%&lt;/TD&gt;&lt;TD&gt;(100%)*(1+&lt;STRONG&gt;30%&lt;/STRONG&gt;) = 130%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022 Q3&lt;/TD&gt;&lt;TD&gt;15%&lt;/TD&gt;&lt;TD&gt;(100%)*(130%)*(1+&lt;STRONG&gt;15%&lt;/STRONG&gt;) = 149.5%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure2 = 
// Variable for (1+Measure1) value 
VAR _n = IF(ISNUMBER('Calculations'[Unit Price]), 'Calculations'[Unit Price] + 1)

RETURN CALCULATE(PRODUCTX( 
     FILTER( ALLSELECTED('Date'[DecimalDate]), 
          'Date'[DecimalDate] &amp;lt;= SELECTEDVALUE('Date'[DecimalDate]) ), 
     _n) )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My returns Measure2 output is ridiculously large numbers.&amp;nbsp;&lt;A href="https://imgur.com/d3SSnfD" target="_blank" rel="noopener nofollow ugc"&gt;Snapshot here&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;I cropped out the row names but each row represents a different supplier. My data starts at 2019 Q3 so Measure 2 should equal (Unit Price + 1) for that quarter. Everything after that should be a product building off of it. But you can see some funky numbers (eg row 2).&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 18 Sep 2022 21:41:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-change-by-quarter-using-ProductX-of-measure/m-p/2776114#M86686</guid>
      <dc:creator>whoopie_pie</dc:creator>
      <dc:date>2022-09-18T21:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative change by quarter using ProductX of measure?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-change-by-quarter-using-ProductX-of-measure/m-p/2778937#M86902</link>
      <description>&lt;P&gt;You can't really put SELECTEDVALUE into a CALCULATE.&amp;nbsp; Use variables instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide sanitized sample data that fully covers your issue. &lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 00:09:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-change-by-quarter-using-ProductX-of-measure/m-p/2778937#M86902</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-09-20T00:09:00Z</dc:date>
    </item>
  </channel>
</rss>

