<?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: Calculate the increment of counted rows between dates in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-increment-of-counted-rows-between-dates/m-p/3265926#M120905</link>
    <description>&lt;P&gt;I've tried to add "+0" in all the countrows and the final substraction but the result is exactly the same, I get blanks instead of the actual decrease of file numbers:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Increment =&lt;BR /&gt;&lt;/SPAN&gt;VAR&lt;SPAN&gt; CurrentDate =&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt; ( 'Listado'[Fecha extracto] )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; PrevDate =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt; ( 'Listado'[Fecha extracto] ), 'Listado'[Fecha extracto] &amp;lt; CurrentDate )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; CurrentNum = &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt; ( 'Listado' ) + &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; PrevNum = &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt; ( 'Listado' ) + &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;, 'Listado'[Fecha extracto] = PrevDate )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; CurrentNum - PrevNum + &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 02 Jun 2023 15:03:55 GMT</pubDate>
    <dc:creator>Terrassa</dc:creator>
    <dc:date>2023-06-02T15:03:55Z</dc:date>
    <item>
      <title>Calculate the increment of counted rows between dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-increment-of-counted-rows-between-dates/m-p/3265727#M120884</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm extracting the list of files in some folders every several days but not on a fix frequency. I need to calculate the increment of number of files between two extraction dates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the look of the extraction table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table visual with the total count per each folder per date:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I need to calculate the increment of files per folder between dates:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to use a measure to calculate the increment. Can you please help me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much in advance&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2023 13:26:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-increment-of-counted-rows-between-dates/m-p/3265727#M120884</guid>
      <dc:creator>Terrassa</dc:creator>
      <dc:date>2023-06-02T13:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the increment of counted rows between dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-increment-of-counted-rows-between-dates/m-p/3265816#M120888</link>
      <description>&lt;P&gt;You could create a measure like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Increment =
VAR CurrentDate =
    MAX ( 'Table'[Extract date] )
VAR PrevDate =
    CALCULATE ( MAX ( 'Table'[Extract date] ), 'Table'[Extract date] &amp;lt; CurrentDate )
VAR CurrentNum =
    COUNTROWS ( 'Table' )
VAR PrevNum =
    CALCULATE ( COUNTROWS ( 'Table' ), 'Table'[Extract date] = PrevDate )
RETURN
    CurrentNum - PrevNum
&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 02 Jun 2023 14:09:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-increment-of-counted-rows-between-dates/m-p/3265816#M120888</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-06-02T14:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the increment of counted rows between dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-increment-of-counted-rows-between-dates/m-p/3265878#M120897</link>
      <description>&lt;P&gt;Hello Johnt75,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works correctly, thank you very much. It just needs one small adjustment. If one folder that had files in the past has been deleted, the increment doesn't calculate the difference correctly, it has blank value. This is the result when creating a matrix with the increment:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The folder "00-Executive Assistant" was deleted, so the countrows doesn't give any value for this folder and the increment is not calculated, it should indicate -10. Same happens in the first row of the table, one file that was in the root folder has been deleted but this is not indicated in the increment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can the formula be modified to consider removed folders?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2023 14:39:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-increment-of-counted-rows-between-dates/m-p/3265878#M120897</guid>
      <dc:creator>Terrassa</dc:creator>
      <dc:date>2023-06-02T14:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the increment of counted rows between dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-increment-of-counted-rows-between-dates/m-p/3265890#M120900</link>
      <description>&lt;P&gt;You could add "+ 0" to the CurrentRows variable. That would force it to return 0 instead of blank and should work out the difference correctly.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2023 14:43:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-increment-of-counted-rows-between-dates/m-p/3265890#M120900</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-06-02T14:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the increment of counted rows between dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-increment-of-counted-rows-between-dates/m-p/3265926#M120905</link>
      <description>&lt;P&gt;I've tried to add "+0" in all the countrows and the final substraction but the result is exactly the same, I get blanks instead of the actual decrease of file numbers:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Increment =&lt;BR /&gt;&lt;/SPAN&gt;VAR&lt;SPAN&gt; CurrentDate =&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt; ( 'Listado'[Fecha extracto] )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; PrevDate =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt; ( 'Listado'[Fecha extracto] ), 'Listado'[Fecha extracto] &amp;lt; CurrentDate )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; CurrentNum = &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt; ( 'Listado' ) + &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; PrevNum = &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt; ( 'Listado' ) + &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;, 'Listado'[Fecha extracto] = PrevDate )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; CurrentNum - PrevNum + &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 02 Jun 2023 15:03:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-increment-of-counted-rows-between-dates/m-p/3265926#M120905</guid>
      <dc:creator>Terrassa</dc:creator>
      <dc:date>2023-06-02T15:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the increment of counted rows between dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-increment-of-counted-rows-between-dates/m-p/3265961#M120907</link>
      <description>&lt;P&gt;I think this is a problem caused by auto exist because everything is in one table. Try creating a table of all the distinct filenames, e.g.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Filename dimension = DISTINCT( 'Listado'[Filename])&lt;/LI-CODE&gt;
&lt;P&gt;link that to your main table in a one-to-many relationship and then use that new column in your visuals.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2023 15:21:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-increment-of-counted-rows-between-dates/m-p/3265961#M120907</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-06-02T15:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the increment of counted rows between dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-increment-of-counted-rows-between-dates/m-p/3266104#M120915</link>
      <description>&lt;P&gt;I tried this solution but the visuals don't work, now they always give the total amount of files in the new table not considering the extract date.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2023 17:30:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-increment-of-counted-rows-between-dates/m-p/3266104#M120915</guid>
      <dc:creator>Terrassa</dc:creator>
      <dc:date>2023-06-02T17:30:02Z</dc:date>
    </item>
  </channel>
</rss>

