<?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 Calculated Table for progressive costs in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Table-for-progressive-costs/m-p/3454912#M131680</link>
    <description>&lt;P&gt;I have three tables, PROJECTS, TIME and ACTUAL. In PROJECTS I have the list of projects (PROJECTID, DESCRIPTION), in TIME I have the list of all the dates (DATE, YEAR, MONTH, YEAR-MONTH), in ACTUAL there are the costs recorded for each project and for each date (PROJECTID , DATE, YEAR, MONTH, YEAR-MONTH, ARTICLE, QUANTITY, AMOUNT). The ACTUAL table is logically linked with a 1:N relationship to the PROJECTS table (PROJECTS.PROJECTID 1:N ACTUAL.PROJECTID). The ACTUAL table is also logically linked to the TIME table (TIME.DATE 1:N ACTUAL.DATE). The PROJECTS and TIME tables are not logically linked. How could the DAX code be to build a calculated table that has as fields: PROJECTID, YEAR-MONTH and COSTITOT (where COSTITOT is for PROJECT/YEAR-MONTH the cumulative cost, i.e. the progressive sum of all the ACTUAL.AMOUNT from the beginning of dates up to YEAR-MONTH ) ?&lt;/P&gt;</description>
    <pubDate>Sun, 01 Oct 2023 07:52:28 GMT</pubDate>
    <dc:creator>Flabenu</dc:creator>
    <dc:date>2023-10-01T07:52:28Z</dc:date>
    <item>
      <title>Calculated Table for progressive costs</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Table-for-progressive-costs/m-p/3454912#M131680</link>
      <description>&lt;P&gt;I have three tables, PROJECTS, TIME and ACTUAL. In PROJECTS I have the list of projects (PROJECTID, DESCRIPTION), in TIME I have the list of all the dates (DATE, YEAR, MONTH, YEAR-MONTH), in ACTUAL there are the costs recorded for each project and for each date (PROJECTID , DATE, YEAR, MONTH, YEAR-MONTH, ARTICLE, QUANTITY, AMOUNT). The ACTUAL table is logically linked with a 1:N relationship to the PROJECTS table (PROJECTS.PROJECTID 1:N ACTUAL.PROJECTID). The ACTUAL table is also logically linked to the TIME table (TIME.DATE 1:N ACTUAL.DATE). The PROJECTS and TIME tables are not logically linked. How could the DAX code be to build a calculated table that has as fields: PROJECTID, YEAR-MONTH and COSTITOT (where COSTITOT is for PROJECT/YEAR-MONTH the cumulative cost, i.e. the progressive sum of all the ACTUAL.AMOUNT from the beginning of dates up to YEAR-MONTH ) ?&lt;/P&gt;</description>
      <pubDate>Sun, 01 Oct 2023 07:52:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Table-for-progressive-costs/m-p/3454912#M131680</guid>
      <dc:creator>Flabenu</dc:creator>
      <dc:date>2023-10-01T07:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Table for progressive costs</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Table-for-progressive-costs/m-p/3455633#M131721</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="624889" data-lia-user-login="Flabenu" class="lia-mention lia-mention-user"&gt;Flabenu&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Make the relationship between TIME &amp;amp; ACTUAL &lt;STRONG&gt;bi-directional&lt;/STRONG&gt; &amp;amp; then try to create the table. If it doesn't work, please share the sample file.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 07:54:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Table-for-progressive-costs/m-p/3455633#M131721</guid>
      <dc:creator>gaurav-lakhotia</dc:creator>
      <dc:date>2023-10-02T07:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Table for progressive costs</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Table-for-progressive-costs/m-p/3457158#M131795</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="624889" data-lia-user-login="Flabenu" class="lia-mention lia-mention-user"&gt;Flabenu&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your statement, I think [PROJECTID] and [YEAR-MONTH] you need are both in 'ACTUAL' table.&lt;/P&gt;
&lt;P&gt;You can just create the calculated table based on 'ACTUAL' table.&lt;/P&gt;
&lt;P&gt;I am still confused about the calculation logic about [COSTITOT] which is based on P&lt;SPAN&gt;ROJECT/YEAR-MONTH.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Do you want to get a table which will show progressive costs? I think it should be comulative amount/&amp;nbsp;comulative quantity.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I think you can try code as below to create a calculated table.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Calculated Table =
SUMMARIZE (
    'ACTUAL',
    'ACTUAL'[PROJECTID],
    'ACTUAL'[YEAR-MONTH],
    "Progressive Costs",
        VAR _Quantity =
            CALCULATE (
                SUM ( 'ACTUAL'[QUANTITY] ),
                FILTER (
                    'ACTUAL',
                    'ACTUAL'[PROJECTID] = EARLIER ( [PROJECTID] )
                        &amp;amp;&amp;amp; 'ACTUAL'[YEAR-MONTH] &amp;lt;= EARLIER ( [YEAR-MONTH] )
                )
            )
        VAR _AMOUNT =
            CALCULATE (
                SUM ( 'ACTUAL'[AMOUNT] ),
                FILTER (
                    'ACTUAL',
                    'ACTUAL'[PROJECTID] = EARLIER ( [PROJECTID] )
                        &amp;amp;&amp;amp; 'ACTUAL'[YEAR-MONTH] &amp;lt;= EARLIER ( [YEAR-MONTH] )
                )
            )
        RETURN
            DIVIDE ( _AMOUNT, _Quantity )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 07:17:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Table-for-progressive-costs/m-p/3457158#M131795</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-03T07:17:46Z</dc:date>
    </item>
  </channel>
</rss>

