<?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 Targets vs Actual by stage - No dates! in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Targets-vs-Actual-by-stage-No-dates/m-p/3195681#M116008</link>
    <description>&lt;P&gt;Hi Guys,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I hope you are all well.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;See link: &lt;A title="Targeted vs Actual" href="https://seedgrowth-my.sharepoint.com/:u:/g/personal/ryan_seedgrowthco_com/EeIBRBx62FNKpIr0mEtH8u0BarXlOKbbx-e4ND3INjUHTg?e=ZLaoJp" target="_blank" rel="noopener"&gt;PBIX FILE&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To summarize what I'm looking to do:&lt;/P&gt;&lt;P&gt;&amp;nbsp;I'm analysing how legal files pass through a legal process (190 steps). I have the actual days each file takes to go through the legal steps, and the expected days it should take. I want to create a forecast of total days required from the current legal step to completion.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The remaining forecast for me is a stepping stone to get to an "expected completion date" for the file. You will see that the FactExpectedFile has no date since it is just a target (Expected days per legal step). I would further like to add the remaining value to the Latest Activity Date, but will tackle this afterwards :).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I followed the SQLBI.com's excellent post "&lt;A href="https://www.sqlbi.com/articles/showing-actuals-and-forecasts-in-the-same-chart-with-power-bi/" target="_self"&gt;Showing forecast and actuals in&amp;nbsp; the same chart with Power BI&lt;/A&gt;" and I've built a similar code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Remaining Expected Steps =
VAR LastLegalStep =
    CALCULATE(
       MAX( FactFiles[LegalSubStepIndex] ),
           FILTER( DimCurrentStep, DimCurrentStep[Legal Step] = "Current"))
    // this get me the current legal step the file
VAR RemainingLegalSteps =
    CALCULATE(
       [Expected Days],
           KEEPFILTERS( FactFiles[LegalSubStepIndex] &amp;gt;= LastLegalStep )
)
RETURN
    RemainingLegalSteps&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But its not working. I just get the expected days for all the steps.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the first part of te code is correct and I get the right value, but not the second part...?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this is enough information to go on?&lt;BR /&gt;&lt;BR /&gt;Thank you in advance!&lt;/P&gt;</description>
    <pubDate>Wed, 19 Apr 2023 11:35:25 GMT</pubDate>
    <dc:creator>Ryan_OC</dc:creator>
    <dc:date>2023-04-19T11:35:25Z</dc:date>
    <item>
      <title>Targets vs Actual by stage - No dates!</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Targets-vs-Actual-by-stage-No-dates/m-p/3195681#M116008</link>
      <description>&lt;P&gt;Hi Guys,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I hope you are all well.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;See link: &lt;A title="Targeted vs Actual" href="https://seedgrowth-my.sharepoint.com/:u:/g/personal/ryan_seedgrowthco_com/EeIBRBx62FNKpIr0mEtH8u0BarXlOKbbx-e4ND3INjUHTg?e=ZLaoJp" target="_blank" rel="noopener"&gt;PBIX FILE&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To summarize what I'm looking to do:&lt;/P&gt;&lt;P&gt;&amp;nbsp;I'm analysing how legal files pass through a legal process (190 steps). I have the actual days each file takes to go through the legal steps, and the expected days it should take. I want to create a forecast of total days required from the current legal step to completion.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The remaining forecast for me is a stepping stone to get to an "expected completion date" for the file. You will see that the FactExpectedFile has no date since it is just a target (Expected days per legal step). I would further like to add the remaining value to the Latest Activity Date, but will tackle this afterwards :).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I followed the SQLBI.com's excellent post "&lt;A href="https://www.sqlbi.com/articles/showing-actuals-and-forecasts-in-the-same-chart-with-power-bi/" target="_self"&gt;Showing forecast and actuals in&amp;nbsp; the same chart with Power BI&lt;/A&gt;" and I've built a similar code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Remaining Expected Steps =
VAR LastLegalStep =
    CALCULATE(
       MAX( FactFiles[LegalSubStepIndex] ),
           FILTER( DimCurrentStep, DimCurrentStep[Legal Step] = "Current"))
    // this get me the current legal step the file
VAR RemainingLegalSteps =
    CALCULATE(
       [Expected Days],
           KEEPFILTERS( FactFiles[LegalSubStepIndex] &amp;gt;= LastLegalStep )
)
RETURN
    RemainingLegalSteps&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But its not working. I just get the expected days for all the steps.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the first part of te code is correct and I get the right value, but not the second part...?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this is enough information to go on?&lt;BR /&gt;&lt;BR /&gt;Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 11:35:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Targets-vs-Actual-by-stage-No-dates/m-p/3195681#M116008</guid>
      <dc:creator>Ryan_OC</dc:creator>
      <dc:date>2023-04-19T11:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: Targets vs Actual by stage - No dates!</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Targets-vs-Actual-by-stage-No-dates/m-p/3217352#M117492</link>
      <description>&lt;P&gt;@&lt;A href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/313" target="_self"&gt;&lt;SPAN class=""&gt;Greg_Deckler&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Any chance you can have a look at the above... Please ;D&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 08:31:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Targets-vs-Actual-by-stage-No-dates/m-p/3217352#M117492</guid>
      <dc:creator>Ryan_OC</dc:creator>
      <dc:date>2023-05-03T08:31:17Z</dc:date>
    </item>
  </channel>
</rss>

