Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am a bit out of practice and have recently been using PBI again. I have a column that calculates if we are before or past the due date in days:
Schedule Adhereance =
IF(ISBLANK(Request[Completed]), 0,
if(
AND(
ISBLANK(Request[Due]), ISBLANK(Request[OriginalDue])),
-1*(Request[TargetComplete] - Request[Completed]),
if(
ISBLANK(Request[Due]),
-1*(Request[OriginalDue] - Request[Completed]),
-1*(Request[Due] - Request[Completed])))
)
I need for it to also filter based on the Status UAT or Done. I have tried many variations but am unable to get this to work.
For each record I expect to see the number of days but if I am using it in the dashboard I expect to see the average number of days.
Solved! Go to Solution.
Ji @kweibelt
Please try creating a measure as follows
Average Schedule Adhereance =
AVERAGEX (
Request,
IF (
ISBLANK ( Request[Completed] )
&& Request[Statis] IN { "UAT", "Done" },
0,
IF (
AND ( ISBLANK ( Request[Due] ), ISBLANK ( Request[OriginalDue] ) ),
( Request[Completed] - Request[TargetComplete] ),
IF (
ISBLANK ( Request[Due] ),
( Request[Completed] - Request[OriginalDue] ),
( Request[Completed] - Request[Due] )
)
)
)
)
@tamerj1 Thank you SO much! This is perfect. I completly forgot about Averagex and that was causing issues for me.
Ji @kweibelt
Please try creating a measure as follows
Average Schedule Adhereance =
AVERAGEX (
Request,
IF (
ISBLANK ( Request[Completed] )
&& Request[Statis] IN { "UAT", "Done" },
0,
IF (
AND ( ISBLANK ( Request[Due] ), ISBLANK ( Request[OriginalDue] ) ),
( Request[Completed] - Request[TargetComplete] ),
IF (
ISBLANK ( Request[Due] ),
( Request[Completed] - Request[OriginalDue] ),
( Request[Completed] - Request[Due] )
)
)
)
)
Please provide sample data that covers your issue or question completely.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |