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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi,
I want a new column that takes into account the values from previous rows.
If "Status" equals to "Resolved", in this row or in previous rows, in new column we should show the value of "Time" column. Otherwise, if in previous rows we haven´t found any Resolved "Status" we should show 0 in the column.
Rows are grouped with "ID" coulmn
In this image, "DAX" column shows what we are looking for:
Thanks
Solved! Go to Solution.
Hi,
According to your description, I create a table to test:
Please take following steps:
1)Add an index column to table:
2)After Close&Apply, create a column:
DAX =
var Resolve = CALCULATE(MIN('Table'[Index]),FILTER('Table','Table'[ID]=EARLIER('Table'[ID]) && 'Table'[Status]= "Resolved"))
return
IF([Index]<Resolve,0,[Time])
3)The result shows:
Here is my test pbix file:
Best Regards,
Giotto Zhi
Hi,
According to your description, I create a table to test:
Please take following steps:
1)Add an index column to table:
2)After Close&Apply, create a column:
DAX =
var Resolve = CALCULATE(MIN('Table'[Index]),FILTER('Table','Table'[ID]=EARLIER('Table'[ID]) && 'Table'[Status]= "Resolved"))
return
IF([Index]<Resolve,0,[Time])
3)The result shows:
Here is my test pbix file:
Best Regards,
Giotto Zhi
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.