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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I cannot figure out how to create these two columns I need:
My data looks like this
| Project ID | Activity ID | Activity Status | Person Assigned | Activity Completion Date |
| 1 | a | Complete | Mike | 10/1 |
| 1 | b | Complete | Mike | 10/3 |
| 1 | a | Complete | Brent | 10/1 |
| 1 | b | Complete | Brent | 10/5 |
| 2 | a | Complete | Mike | 10/3 |
| 2 | b | Complete | Mike | 10/4 |
| 2 | a | Complete | Brent | 10/3 |
| 2 | b | Active | Brent |
So I need the "Project Status" column to say "Complete" for Project 1 and "Active" for project 2 based on the "Activity Status Column." I also need a "Project Completion Date" column to calculate the completion date for the project based off of the latest Activity Completion Date (10/5 for project 1).
Any help would be appreciated!
Solved! Go to Solution.
@mhanne , Try new columns like
project Status =
var _1 = countx(filter(Table, [Project_id] = earlier([Project_id]) && [Activity Status] = "Active"),[Activity ID])
return
if(isblank(_1) , "Complete", "Active")
project Date =
countx(filter(Table, [Project_id] = earlier([Project_id]) && [project Status] = "Complete"),[Date])
Thank you SO MUCH! The first column worked perfectly, but I am having some issues with the second.
With my fields, it looks like this:
For the Project Date measure, use MAXX instead of countx:
project Date =
MAXX(filter(Table, [Project_id] = earlier([Project_id]) && [project Status] = "Complete"),[Date])
@mhanne , Try new columns like
project Status =
var _1 = countx(filter(Table, [Project_id] = earlier([Project_id]) && [Activity Status] = "Active"),[Activity ID])
return
if(isblank(_1) , "Complete", "Active")
project Date =
countx(filter(Table, [Project_id] = earlier([Project_id]) && [project Status] = "Complete"),[Date])
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 36 | |
| 34 | |
| 31 | |
| 27 |
| User | Count |
|---|---|
| 136 | |
| 103 | |
| 67 | |
| 65 | |
| 56 |