Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
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 )
)
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 43 | |
| 37 | |
| 34 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 65 | |
| 64 | |
| 31 | |
| 26 | |
| 25 |