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,
Is it possible to return date when running total hit a specific target? F.ex. I would like to check the threshold within 2 weeks ahead and see if the target is below certain value.
My dax which return running total looks something like this
Solved! Go to Solution.
Hi @gyeea84 ,
I know that your [current capacity], [total out] and [total in] are all measures, but I can't reproduce your model, so I can only use fact columns instead.
Please refer to the formula below.
Estimated remaining capacity =
VAR sum_out =
SUMX(
FILTER( ALLSELECTED(Sheet2), [Date] <= MAX([Date]) ),
[Total Out]
)
VAR sum_in =
SUMX(
FILTER( ALLSELECTED(Sheet2), [Date] <= MAX([Date]) ),
[Total In]
)
RETURN
[current capacity] + sum_out - sum_in
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @gyeea84 ,
I know that your [current capacity], [total out] and [total in] are all measures, but I can't reproduce your model, so I can only use fact columns instead.
Please refer to the formula below.
Estimated remaining capacity =
VAR sum_out =
SUMX(
FILTER( ALLSELECTED(Sheet2), [Date] <= MAX([Date]) ),
[Total Out]
)
VAR sum_in =
SUMX(
FILTER( ALLSELECTED(Sheet2), [Date] <= MAX([Date]) ),
[Total In]
)
RETURN
[current capacity] + sum_out - sum_in
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @gyeea84 ,
Please show us the sample data and the expected output result.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
This is the example of the report. This report will estimate the available capacity in warehouse based on total pallet coming in and going out in daily basis.
Total in + out = data come from different tables and use measure to calculate
Current capacity = data come from a table and use measure to calculate
Estimated remaining capacity = current capacity + total out - total in. This is the running total measure because I need to accumulate the total based on daily basis. F.ex. today is 30.10, current capacity is 2066, total in is 841, total out is 1133, so estimated remaining capacity = 2066+1133-841=2358. The next day, 31.10, current capacity which is remaining capacity for today 2358, total in 55, total out 18, so 2358+18-55=2321, and calculation continue. The measure of this running total is on the original post.
My main goal is to return a date where the estimated remaining capacity hit, f.ex., 2000.
Create a measure where you have a table variable with all dates in your window, then calculate the running total for each of the dates, and then find the minimum date that has the running total above your threshold.
Use variables along the way, and use CONCATENATEX() to verify that you get the expected intermediate results.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.