Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all,
I have the following tables, relationships and data:
Project:
Task:
ProjectPhaseSummary:
I want to add calculated columns to "ProjectPhaseSummary", so that I end up with the following:
Hoping someone can please suggest the most accepted way of generating the information above with DAX (preferably using CALCULATE).
Thanks,
Ben.
Solved! Go to Solution.
Hi @bhalicki
As an example:
PlanningStarDate =
MAXX (
FILTER ( Project, Project[ProjectId] = ProjectPhaseSummary[ProjectId] ),
MAXX (
FILTER ( RELATEDTABLE ( Task ), Task[Phase] = "Planning" ),
Task[StartDate]
)
)
Hi @bhalicki
As an example:
PlanningStarDate =
MAXX (
FILTER ( Project, Project[ProjectId] = ProjectPhaseSummary[ProjectId] ),
MAXX (
FILTER ( RELATEDTABLE ( Task ), Task[Phase] = "Planning" ),
Task[StartDate]
)
)
If you have some flex on the exact layout, you should be able to do it with minimal DAX.
add a matrix
put project[proj id] onto rows
put task[phase] onto columns
Write this measure and add it to values
date range = SELECTEDVALUE(Task[startdate]) & " - " & SELECTEDVALUE(Task[enddate])
with your current data, the 3 phases will not sort correctly. You could add a sort order column to fix this. If it were me, I would create a new phase dim table in power query and add a sort column, 1 for planning, 2 for design, 3 for execute. Load it into the model join it to the task table, then sort the dim text column by the sort column. Replace the phase column in the visual (remove the phase from task and add phase from the dim table}
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |