Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Heiner26
Frequent Visitor

Development of the average dwell time of a project in a specific phase

Hi there,

hope, you're all safe and sound 😀

I am trying to show the development of the average dwell time of a project in a respective phases and would be pleased to receive support or at least a hint.

 

Initial situation:
I have a list of projects that go through certain phases (1&2). What I want to show is how the average dwell time in a respective phase develops. Only projects with the following properties should be taken from the list when calculating it for Phase 1:

  • Phase = "1" (-> project is in the respective phase to be calculated)
  • Status <> ‘rejected’ (-> project is still ‘live’)
  • Date moved out = ‘empty’ (-> project is still in the phase to be calculated)
Project NameDate moved inDate moved outPhaseStatus
P123/10/2023 1live
P223/11/2023 1live
P301/12/2023 1rejected
P401/12/2023 1live
P504/12/2023 2live
P623/12/2023 1live
P724/01/2024 1rejected
P824/01/2024 1live
P925/01/2024 2live

 

Desired result:

In the desired output table the colums should be the dates out of the date tabel (End of each month)

And for the respective gate the average dwell time should be shown. For the examples above the correct values are as follows:

  • Oct: 8 days
  • Nov: 23 days
  • Dec:  36 days
  • Jan:  55 days

they are cacluated as follows:

Project31/10/202330/11/202331/12/202331/01/2024
P183869100
P2 73869
P3not matching the criteria
P4  3061
P5not matching the criteria
P6  839
P7not matching the criteria
P8   7
P9not matching the criteria
Avg.8233655

 

My approach:

I created this DAX formular using AVERAGEX to calculate the values:

 

AvgDaysInGate1 =

    AVERAGEX(

        FILTER(

Table,

[Phase]= "1"

&&

[Status]<> "rejected"

&&

[Date moved out]= BLANK()

),

DATEDIFF([Date moved in], MAX(Datetable[Date]),DAY

))

 

The challenge:

With this DAX formular every project is only used once in the calculation. Or better to say: Project "P1" is included in the calculation for October but isn't for November. For November only "P2" is considered for the calculation - so the value for November I get in my Power BI Table is "7". Same for December: Projects with a "Date moved in" before December are not taken into account:

 

Heiner26_0-1730039389158.png

 

Does anybody know how I could twich my dax formular to get the right values? 🙏

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

3 REPLIES 3
Heiner26
Frequent Visitor

Thank you! This shows exactly what I was looking for 😀🙏

And sure: now there is no need to dwell on it 😉

Heiner26
Frequent Visitor

Thank you! This shows exactly what I was looking for 🙏

lbendlin
Super User
Super User

lbendlin_0-1730053578664.png

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.