Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hi forum ![]()
I would appreciate your help on the following matter:
down below you can see an example table. I would like to calculate the column Lifecycle based on:
partnumber & the date difference between the applied action install.
I hope the example table explains better what I am trying to do (calculate lifecycle in days --> for each partnumber if install dates are available - lifecycle intervall is last install date subtracted by the the install date before).
I am kind of new to Power BI and DAX so I would really appreciate it if somebody could help me on that matter.
If the example I am showing is not doable in Power BI or you need any further information please let me know.![]()
Solved! Go to Solution.
Try this Calculated Column
LifeCycle =
VAR CurrentDate = TableName[Date]
VAR PreviousDate =
CALCULATE (
MAX ( TableName[Date] ),
FILTER (
ALLEXCEPT ( TableName, TableName[PartNumber] ),
TableName[Action] = "Install"
&& TableName[Date] < CurrentDate
)
)
RETURN
IF (
NOT ( ISBLANK ( PreviousDate ) )
&& TableName[Action] = "Install",
DATEDIFF ( PreviousDate, CurrentDate, DAY )
)
Try this Calculated Column
LifeCycle =
VAR CurrentDate = TableName[Date]
VAR PreviousDate =
CALCULATE (
MAX ( TableName[Date] ),
FILTER (
ALLEXCEPT ( TableName, TableName[PartNumber] ),
TableName[Action] = "Install"
&& TableName[Date] < CurrentDate
)
)
RETURN
IF (
NOT ( ISBLANK ( PreviousDate ) )
&& TableName[Action] = "Install",
DATEDIFF ( PreviousDate, CurrentDate, DAY )
)
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 65 | |
| 41 | |
| 40 | |
| 39 | |
| 39 |