<?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: How to get the aging in each month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-aging-in-each-month/m-p/3441009#M130705</link>
    <description>&lt;P&gt;Hi. Yes.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;age 90+ = 
    VAR t =
        FILTER (
            ADDCOLUMNS (
                GENERATE (
                    VALUES ( 'Date'[Month-Year] ),
                    SUMMARIZE ( 'Table', 'Table'[Opened Date], 'Table'[Closed Date] )
                ),
                "@age", [age]
            ),
            [@age] &amp;gt;= 90
        )
    RETURN
        COUNTROWS ( t )&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Sep 2023 07:00:47 GMT</pubDate>
    <dc:creator>ERD</dc:creator>
    <dc:date>2023-09-21T07:00:47Z</dc:date>
    <item>
      <title>How to get the aging in each month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-aging-in-each-month/m-p/3438604#M130525</link>
      <description>&lt;P&gt;I want to get the aging of the items in each month from opened date to closed date.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;So for the table below, what would be the age of the items below in April, then May, June and so forth. The aging will stop once the fill date has come. If no fill date, then today will be used.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Opened Date&lt;/TD&gt;&lt;TD&gt;Closed Date&lt;/TD&gt;&lt;TD&gt;April&lt;/TD&gt;&lt;TD&gt;May&lt;/TD&gt;&lt;TD&gt;June&lt;/TD&gt;&lt;TD&gt;July&lt;/TD&gt;&lt;TD&gt;August&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5/1/2023&lt;/TD&gt;&lt;TD&gt;8/16/2023&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4/1/2023&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;Hope this makes sense. Thanks in advance!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 16:59:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-aging-in-each-month/m-p/3438604#M130525</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-19T16:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the aging in each month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-aging-in-each-month/m-p/3439251#M130570</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;, should the age be in days or months? As far as I understand you have a matrix with months as columns.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 05:31:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-aging-in-each-month/m-p/3439251#M130570</guid>
      <dc:creator>ERD</dc:creator>
      <dc:date>2023-09-20T05:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the aging in each month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-aging-in-each-month/m-p/3439388#M130580</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi! The age should be in days. For the months in columns, I want to know the age if that month is finished.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 06:50:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-aging-in-each-month/m-p/3439388#M130580</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-20T06:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the aging in each month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-aging-in-each-month/m-p/3439452#M130582</link>
      <description>&lt;P&gt;I assume you have a Date table. Here is the measure:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;age =
VAR monthStart = MIN ( 'Date'[Date] )
VAR monthEnd = MAX ( 'Date'[Date] )
VAR opened = SELECTEDVALUE ( 'Table'[Opened Date] )
VAR closed = COALESCE ( SELECTEDVALUE ( 'Table'[Closed Date] ), TODAY () )
VAR days = DATEDIFF ( opened, monthEnd, DAY ) + 1
RETURN
    IF ( TODAY () &amp;gt; monthEnd &amp;amp;&amp;amp; monthStart &amp;gt;= opened &amp;amp;&amp;amp; monthEnd &amp;lt;= closed, days )&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 07:24:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-aging-in-each-month/m-p/3439452#M130582</guid>
      <dc:creator>ERD</dc:creator>
      <dc:date>2023-09-20T07:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the aging in each month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-aging-in-each-month/m-p/3440382#M130663</link>
      <description>&lt;P&gt;This is perfecly working! I have another question, would it be possible to count the number of items whose age is 90+? For example, in the month of June, there is 1 item whose age is 91 so that should count as 1 for the month of June only.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 17:31:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-aging-in-each-month/m-p/3440382#M130663</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-20T17:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the aging in each month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-aging-in-each-month/m-p/3441009#M130705</link>
      <description>&lt;P&gt;Hi. Yes.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;age 90+ = 
    VAR t =
        FILTER (
            ADDCOLUMNS (
                GENERATE (
                    VALUES ( 'Date'[Month-Year] ),
                    SUMMARIZE ( 'Table', 'Table'[Opened Date], 'Table'[Closed Date] )
                ),
                "@age", [age]
            ),
            [@age] &amp;gt;= 90
        )
    RETURN
        COUNTROWS ( t )&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 07:00:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-aging-in-each-month/m-p/3441009#M130705</guid>
      <dc:creator>ERD</dc:creator>
      <dc:date>2023-09-21T07:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the aging in each month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-aging-in-each-month/m-p/3441988#M130778</link>
      <description>&lt;P&gt;Thank you so much for your help, Mate! One last question, what if I want to get the age up to the current day or up to the closed date? for example in the row 2, the closed date is 8/16, right? I want to get the age on the August column but up to the August 16 only.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 18:51:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-aging-in-each-month/m-p/3441988#M130778</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-21T18:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the aging in each month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-aging-in-each-month/m-p/3442395#M130806</link>
      <description>&lt;LI-CODE lang="markup"&gt;age =
VAR monthStart =
    MIN ( 'Date'[Date] )
VAR monthEnd =
    MAX ( 'Date'[Date] )
VAR opened =
    SELECTEDVALUE ( 'Table'[Opened Date] )
VAR closed =
    COALESCE ( SELECTEDVALUE ( 'Table'[Closed Date] ), TODAY () )
VAR days =
    DATEDIFF ( opened, monthEnd, DAY ) + 1
VAR endDay =
    IF ( monthEnd &amp;lt;= closed, monthEnd, closed )
VAR days_last =
    DATEDIFF ( opened, endDay, DAY ) + 1
RETURN
    IF ( TODAY () &amp;gt; monthEnd &amp;amp;&amp;amp; monthStart &amp;gt;= opened, days_last )&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 22 Sep 2023 05:45:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-aging-in-each-month/m-p/3442395#M130806</guid>
      <dc:creator>ERD</dc:creator>
      <dc:date>2023-09-22T05:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the aging in each month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-aging-in-each-month/m-p/3448503#M131287</link>
      <description>&lt;P&gt;Thanks for this. My problem with this is that if the monthEnd is greater than today and the monthStart &amp;lt; opened, the data is skewed and I tried creating a solution but to no avail. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 19:25:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-aging-in-each-month/m-p/3448503#M131287</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-26T19:25:07Z</dc:date>
    </item>
  </channel>
</rss>

