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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi
I'm new to PBI and I'm struggling to find a solution for my problem.
The problem
I need to calculate (count) the statuses of my data based on specific dates (e.g. weekly on Wednesday).
| Actions | Deadline | Start Date | Finish Date | Status |
| Action 1 | f(Reference Date, Deadline, Start Date, Finish Date) | |||
| Action 2 |
Describing my data (fActionPlan)
The expected outcome
Any guidance on this?
Thank you for any advice.
Hi, @matheus_
Based on your the logic of the calculated column, I created sample data to reproduce your scenario.
There is something wrong with the result because '_finishdate>_refdate' appears in each branch. Could you please show us some sample data and expected result with OneDrive for Business? Do mask sensitive data before uploading. Thanks.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-alq-msft
I prepared a sample data but then found out I'm not able to share links externally.
From your image, I can suggest the correction:
Sample data
The expected outcome
The tricky issue here is that:
Sometimes I suspect such intelligence is not yet available unless I try to model with scripting. Do you have the same opinion?
Hi
@v-alq-msft @amitchandak do you believe this is something doable with DAX/PowerBI?
Would it be easier with Python/R scripts? Maybe a different way to structure my data?
Thanks for any guidance you may have.
@matheus_ ,Can you share sample data and sample output in a table format? Or a sample pbix after removing sensitive data.
You need a new column like
if(datediff([start date], [finish date] ,Day)>=7, "Delayed","Not Delayed")
Please Watch/Like/Share My webinar on Time Intelligence: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...
My Youtube Tips at: https://www.youtube.com/playlist?list=PLPaNVDMhUXGYrm5rm6ME6rjzKGSvT9Jmy
Appreciate your Kudos.
Hi @amitchandak thanks for your response.
I'll try to prepare a sample data.
1. What I accomplished and my solution so far
_Status Dynamic =
VAR _refdate = fActions[_Ref Date]
VAR _deadline = fActions[Deadline]
VAR _startdate = fActions[Start Date]
VAR _finishdate = fActions[Finish Date]
VAR _flag = fActions[Flag Cancelled]
RETURN
IF(_flag = "1", "Cancelled",
IF(_deadline = BLANK(),
"To do",
IF(_deadline >= _refdate && // deadline in the future
_startdate = BLANK() || // no initiated OR
_startdate > _refdate && // initiated in the future
_finishdate = BLANK() || // no finished OR
_finishdate > _refdate, // finished in the future
"To do",
IF(_deadline < _refdate && // deadline in the past
_finishdate = BLANK() || // not finished OR
_finishdate > _refdate, // finished in the future
"Delayed",
IF(_deadline >= _refdate && // deadline in the future
_startdate <> BLANK() && // initiated
_startdate <= _refdate && // initiated in the past
_finishdate = BLANK() || // not finished OR
_finishdate > _refdate, // finished in the future
"Ongoing",
IF(_startdate <> BLANK() && // initiated
_startdate <= _refdate && // initiated in the past OR now
_finishdate <> BLANK() && // finished
_finishdate <= _refdate, // finished in the pas OR now
"Done",
"Review"
))))))
2. The outcome
Suggestions?
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!