Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi Guys,
I hope you are all well.
See link: PBIX FILE
To summarize what I'm looking to do:
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.
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 :).
I followed the SQLBI.com's excellent post "Showing forecast and actuals in the same chart with Power BI" and I've built a similar code
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] >= LastLegalStep )
)
RETURN
RemainingLegalSteps
But its not working. I just get the expected days for all the steps.
the first part of te code is correct and I get the right value, but not the second part...?
Can anyone help?
I hope this is enough information to go on?
Thank you in advance!