<?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: calculation using Previous value empty in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculation-using-Previous-value-empty/m-p/3415317#M129202</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="610805" data-lia-user-login="ingpiolo" class="lia-mention lia-mention-user"&gt;ingpiolo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created a sample pbix file(see&lt;EM&gt;&lt;STRONG&gt; the attachment&lt;/STRONG&gt;&lt;/EM&gt;), please find the details in it.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Result = 
VAR _seldate =
    SELECTEDVALUE ( 'Table'[Date] )
VAR _maxdate =
    CALCULATE (
        MAX ( 'Table'[Date] ),
        FILTER ( ALLSELECTED ( 'Table' ), [Sum of value] &amp;gt; 0 )
    )
VAR _value =
    SUMX (
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] = _maxdate ),
        [Sum of value]
    )
VAR _measures =
    CALCULATE (
        SUM ( 'Table'[Measure] ),
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] &amp;lt;= _seldate )
    )
RETURN
    IF (
        ISBLANK ( SELECTEDVALUE ( 'Table'[Measure] ) ),
        BLANK (),
        _value + _measures
    )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
    <pubDate>Tue, 05 Sep 2023 09:36:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-09-05T09:36:08Z</dc:date>
    <item>
      <title>calculation using Previous value empty</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculation-using-Previous-value-empty/m-p/3408147#M128793</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I have a table 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;&lt;SPAN&gt;I should calculate subsequent fields as indicated iteratively by associating a measure (Filled fields are final values while empty ones are an estimate of future values based on the selection of a parameter).&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;Do you have any suggestions?&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 31 Aug 2023 07:22:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculation-using-Previous-value-empty/m-p/3408147#M128793</guid>
      <dc:creator>ingpiolo</dc:creator>
      <dc:date>2023-08-31T07:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: calculation using Previous value empty</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculation-using-Previous-value-empty/m-p/3408359#M128801</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="610805" data-lia-user-login="ingpiolo" class="lia-mention lia-mention-user"&gt;ingpiolo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To get the previous months data try this&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Previous Month = CALCULATE(SUM('Table'[Valore]), DATEADD('Table'[Date], -1, MONTH))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would think then that you should create a new measure&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[Previous Month] + [YourMeasure]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&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;Thanks&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;If this post helps, then please Accept it as the solution&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 08:47:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculation-using-Previous-value-empty/m-p/3408359#M128801</guid>
      <dc:creator>JoeBarry</dc:creator>
      <dc:date>2023-08-31T08:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: calculation using Previous value empty</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculation-using-Previous-value-empty/m-p/3408411#M128803</link>
      <description>&lt;P&gt;Thanks Joe for the reply.&lt;BR /&gt;The problem is that I have empty cells and therefore with the measure&lt;BR /&gt;Previous Month = CALCULATE(SUM('Table'[Value]), DATEADD('Table'[Date], -1, MONTH))&lt;/P&gt;&lt;P&gt;I get correctly only the next first value referring to 01/07/2023.&lt;BR /&gt;Subsequent ones should resume the value at 01/07/2023 which is saved as a measure. This is the result I would like to get&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 08:59:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculation-using-Previous-value-empty/m-p/3408411#M128803</guid>
      <dc:creator>ingpiolo</dc:creator>
      <dc:date>2023-08-31T08:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: calculation using Previous value empty</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculation-using-Previous-value-empty/m-p/3415317#M129202</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="610805" data-lia-user-login="ingpiolo" class="lia-mention lia-mention-user"&gt;ingpiolo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created a sample pbix file(see&lt;EM&gt;&lt;STRONG&gt; the attachment&lt;/STRONG&gt;&lt;/EM&gt;), please find the details in it.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Result = 
VAR _seldate =
    SELECTEDVALUE ( 'Table'[Date] )
VAR _maxdate =
    CALCULATE (
        MAX ( 'Table'[Date] ),
        FILTER ( ALLSELECTED ( 'Table' ), [Sum of value] &amp;gt; 0 )
    )
VAR _value =
    SUMX (
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] = _maxdate ),
        [Sum of value]
    )
VAR _measures =
    CALCULATE (
        SUM ( 'Table'[Measure] ),
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] &amp;lt;= _seldate )
    )
RETURN
    IF (
        ISBLANK ( SELECTEDVALUE ( 'Table'[Measure] ) ),
        BLANK (),
        _value + _measures
    )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2023 09:36:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculation-using-Previous-value-empty/m-p/3415317#M129202</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-05T09:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: calculation using Previous value empty</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculation-using-Previous-value-empty/m-p/3419121#M129415</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks a lot for the support.&lt;/P&gt;&lt;P&gt;I tried but unfortunately I didn't succeed. I am attaching the file to clarify my situation.&lt;/P&gt;&lt;P&gt;Thanks for your support&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/15fXdGIKlAwNIQbEWUGQow9kBN0DCmZZm/view?usp=drive_link" target="_self"&gt;https://drive.google.com/file/d/15fXdGIKlAwNIQbEWUGQow9kBN0DCmZZm/view?usp=drive_link&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 07:13:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculation-using-Previous-value-empty/m-p/3419121#M129415</guid>
      <dc:creator>ingpiolo</dc:creator>
      <dc:date>2023-09-07T07:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: calculation using Previous value empty</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculation-using-Previous-value-empty/m-p/3419341#M129423</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="610805" data-lia-user-login="ingpiolo" class="lia-mention lia-mention-user"&gt;ingpiolo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;It seems that I have no access to your shared file, could you please grant me the proper permisson to it? Thank you.&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 09:23:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculation-using-Previous-value-empty/m-p/3419341#M129423</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-07T09:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: calculation using Previous value empty</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculation-using-Previous-value-empty/m-p/3419525#M129431</link>
      <description>&lt;P&gt;Ok,&amp;nbsp;I should have unlocked access. you can check?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 11:30:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculation-using-Previous-value-empty/m-p/3419525#M129431</guid>
      <dc:creator>ingpiolo</dc:creator>
      <dc:date>2023-09-07T11:30:13Z</dc:date>
    </item>
  </channel>
</rss>

