Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
pinar1
Frequent Visitor

Creating Interconnected Date Columns by Priority Index for Gantt Chart

Hello, 

I am new to the BI and I have searched the Forum to see of I can find a solution. But I couldn't find. So It would be super if somebody could help me with my question. I need to prepare a @Gantt for work but lack some info:  
 
I have the information below: 
Each Resource has different tasks with a priority sequence.
 
ResourceTaskPriority Start DateDuration (day)End Date
Floridasushi1 2 
Floridapasta2 4 
Miamiburito1 1 
Miaminachos2 2 
Miamipizza3 3 
Miamisteak4 1 
 
 
What I need is to create a Start Date column, which will automatically return Today's Date for Priority=1  for each resource and then adds the Duration for End Date column. 
After that, the Task with Priority=2 will have a Start Date equal to the End Date of Priority=1 Task. Then Priority=3 Task will have Start Date equal to End Date of Priority=2 Task. 
So I want to see something like this:
 
 
ResourceTaskPriority    Start DateDuration (day)             End Date
Floridasushi18/30/202029/1/2020
Floridapasta29/1/202049/5/2020
Miamiburito18/30/202018/31/2020
Miaminachos28/31/202029/2/2020
Miamipizza39/2/202039/5/2020
Miamisteak49/2/202019/3/2020

 

 

It would be so much appreciated! 

 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@pinar1 

Add the following two columns to your table by going to theTable, New Column:

Start Date

Start Date = 
var T = TODAY()
VAR P = [Priority ]
RETURN
SWITCH( TRUE(),
P=1, T,
CALCULATE( T + SUM(Table4[Duration (day)]), Table4[Priority ] < P, ALLEXCEPT(Table4,Table4[Resource]))  
)

End Date

End Date = [Start Date] +[Duration (day)]

 

Fowmy_0-1599467319617.png

 





________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

1 REPLY 1
Fowmy
Super User
Super User

@pinar1 

Add the following two columns to your table by going to theTable, New Column:

Start Date

Start Date = 
var T = TODAY()
VAR P = [Priority ]
RETURN
SWITCH( TRUE(),
P=1, T,
CALCULATE( T + SUM(Table4[Duration (day)]), Table4[Priority ] < P, ALLEXCEPT(Table4,Table4[Resource]))  
)

End Date

End Date = [Start Date] +[Duration (day)]

 

Fowmy_0-1599467319617.png

 





________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors