Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hi, I need help in creating a calculated column and don't know where to start.
So I have a dataset with Portfolio, Project, Reporting Date, Status as columns.
| Portfolio | Project | Reporting Date | Status | Progress |
| Data | AAAA | 01 Apr 2022 | Started | 0 |
| Data | AAAA | 01 May 2022 | Completed | 1 |
| Data | AAAA | 01 June 2022 | On track | 0 |
| Data | AAAA | 01 July 2022 | Completed | 1 |
| Data | BBBB | 01 Apr 2022 | Completed | 0 |
| Data | BBBB | 01 May 2022 | Started | 0 |
| Data | BBBB | 01 June 2022 | Completed | 1 |
| Data | BBBB | 01 July 2022 | Completed | 0
|
| Divison | CCCC | 01 Apr 2022 | Completed | 0 |
| Divison | CCCC | 01 May 2022 | Started | 0 |
| Divison | CCCC | 01 June 2022 | Started | 0 |
| Divison | CCCC | 01 July 2022 | Completed | 2
|
What I want to calculate is the Progress column (expected output in red), which is how long it took the status to turn to Completed. For example for the first project, it went from started to completed after 1 month in May and July, and for the second project it went Completed after 1 month in June, and similarly it took 2 months for the status to go to Green for the 3rd project.
For the second project, since the month after (July) was also "Completed", the progress remains at 0.
Also for the month in Apr in the same project the status is "Completed" but since that is the first entry that is recorded, there is no other Completed status to compare to hence why it is 0.
How would I do this?
Solved! Go to Solution.
@SMITHY10283 , Update one and file attached
Progress1 =
var _min = Maxx(filter(Projects, Projects[project] = earlier(Projects[Project]) && Projects[Status] = "Completed" && [Reporting Date] < earlier([Reporting Date])) , [Reporting Date])
var _min1 = if(ISBLANK(_min) , minx(filter(Projects, Projects[project] = earlier(Projects[Project]) && [Reporting Date] < earlier([Reporting Date])) , [Reporting Date]) , minx(filter(Projects, Projects[project] = earlier(Projects[Project]) && [Reporting Date] >_min && [Reporting Date] < earlier([Reporting Date])) , [Reporting Date]))
return
if(Projects[Status] = "Completed", DATEDIFF(_min1, [Reporting Date], MONTH),0
)
Sorry didn't work, I have edited my original post
@SMITHY10283 , Update one and file attached
Progress1 =
var _min = Maxx(filter(Projects, Projects[project] = earlier(Projects[Project]) && Projects[Status] = "Completed" && [Reporting Date] < earlier([Reporting Date])) , [Reporting Date])
var _min1 = if(ISBLANK(_min) , minx(filter(Projects, Projects[project] = earlier(Projects[Project]) && [Reporting Date] < earlier([Reporting Date])) , [Reporting Date]) , minx(filter(Projects, Projects[project] = earlier(Projects[Project]) && [Reporting Date] >_min && [Reporting Date] < earlier([Reporting Date])) , [Reporting Date]))
return
if(Projects[Status] = "Completed", DATEDIFF(_min1, [Reporting Date], MONTH),0
)
@SMITHY10283 , Try a measure like
new column =
var _min = minx(filter(Table, Table[project] = earlier(Table[Project]) && Table[Status] = "Completed") , [Reporting Date])
return
if([reporting Date] =_min, 1, 0)
Power BI DAX- Earlier, I should have known Earlier: https://www.youtube.com/watch?v=cN8AO3_vmlY&t=17820s
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 80 | |
| 40 | |
| 31 | |
| 27 | |
| 27 |