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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
colettb
Frequent Visitor

Help with How to Create a Timeline

Hi Community!

 

I am trying to make a graphic like below.  I have multiple studies with three main milestone dates (denoted by colored circles). I need to have a bar that shows the total time the project took (denoted by green, pink and blue lines) and then have some way to show where each of the 3 milestones occurred.  Any ideas or suggestions?  I've tried various line, bar, Gantt charts but haven't found a close solution. 

colettb_9-1750195315683.png

 

Thanks for any guidance!

1 ACCEPTED SOLUTION

Hello @colettb 

 

i would do something like this.

Irwan_0-1750210044939.png

1. create list of date from Start Date up to End Date

Irwan_1-1750210104307.png

2. create calendar table

Irwan_2-1750210264376.png

3. create relationship between two table

Irwan_3-1750210278240.png

4. create a measure define value (this makes the width of column is not too long or else the value will be date format)

Value =
IF(
    not ISBLANK(SELECTEDVALUE('Table'[Custom.1])),
    1,
    0
)

5. create two measure for conditonal formating (make background color red and make value transparant)

Color Background =
IF(
    [Value]=1,
    "#FF0000"
)
Color Font =
IF(
    not ISBLANK([Value]),
    "#FFFFFF00"
)

5. assign conditional formatting for background and font

6. create a calculated column to check whether the list of date coincide with any of milestone date

Irwan_4-1750210404797.png

7. assign conditional formating icon

 

Detail is in pbix.

 

Hope this will help.

Thank you.

View solution in original post

5 REPLIES 5
colettb
Frequent Visitor

Hi @Irwan!

 

I'm happy to give some sample data.  I've added teh start and end date columns you suggested.  I would need to have some sort of mark during the start-end period where the 3 milestones occurred. 

 

colettb_0-1750201745876.png

 

Hello @colettb 

 

i would do something like this.

Irwan_0-1750210044939.png

1. create list of date from Start Date up to End Date

Irwan_1-1750210104307.png

2. create calendar table

Irwan_2-1750210264376.png

3. create relationship between two table

Irwan_3-1750210278240.png

4. create a measure define value (this makes the width of column is not too long or else the value will be date format)

Value =
IF(
    not ISBLANK(SELECTEDVALUE('Table'[Custom.1])),
    1,
    0
)

5. create two measure for conditonal formating (make background color red and make value transparant)

Color Background =
IF(
    [Value]=1,
    "#FF0000"
)
Color Font =
IF(
    not ISBLANK([Value]),
    "#FFFFFF00"
)

5. assign conditional formatting for background and font

6. create a calculated column to check whether the list of date coincide with any of milestone date

Irwan_4-1750210404797.png

7. assign conditional formating icon

 

Detail is in pbix.

 

Hope this will help.

Thank you.

colettb
Frequent Visitor

Thank you @Irwan!  That does get me closer.  I understand the need for start and end dates for each row.  Once I get that done, what type of visualization would allow me to plot the 3 important dates and have them called out plainly?  Any suggestions?

hello @colettb 

 

it would be great if you can give a sample of your original data.

but as far as i know, the only default visual that can do your screenshot is matrix.

however, matrix only accepts 100column so you can have only up to 3month if daily (3x30days).

 

Thank you.

Irwan
Super User
Super User

hello @colettb 

 

in my case, i created a multiple date in power query because in power bi you need a value in those days to be filled.

Irwan_0-1750199655591.png

 

from this value

Irwan_1-1750199819229.png

becomes this value

Irwan_2-1750199836061.png

using this m-code

Table.AddColumn("Previous Step", "Custom", each Table.AddColumn(#"Filled Down", "Custom", each {Number.From([Start])..Number.From([End])}))

 

then you can plot in matrix visual to get that values in between two dates.

 

Hope this will help.

Thank you.

 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.