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! Learn more

Reply
ReadTheIron
Helper III
Helper III

Timeline visualization - weeks with or without a value

I'm trying to present a visualization showing both the number of weeks since an asset was repaired and the weeks that the asset failed. Something like this:

ReadTheIron_0-1627310286511.png

(Green = week without failure, Red = week with failure)

I have a file with a list of failure dates, which I've connected via Relationships to the file with the name of the asset and the date repaired (many to one). I'm at a loss where to go from here. I'm thinking a matrix with conditional formatting, but I'm not sure how to bring in the failure date info.

 

Thank you for any guidance!

2 ACCEPTED SOLUTIONS
BA_Pete
Super User
Super User

Hi @ReadTheIron ,

 

You'd need to convert your failures into a number in order to apply them as format conditions.

You could use a measure something like this:

_failureFlag =
IF(
  NOT ISBLANK(yourFailureTable[failureDate]),
  1,
  0
)

Then put this measure into the matrix with your calendar dates as columns.

 

In the conditional formatting options for the matrix, you would apply formatting as RULES, then set the rules based on this measure to 'value is 1' = RED, 'value is 0 = GREEN'.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

Anonymous
Not applicable

Hi @ReadTheIron ,

 

I have built a simply data samply as shown below:

Repaired-Failed data sample.PNG

Based on my test, I'd suggest you create a new calendar table and build relationship between it and Failure table like this:

Calendar = ADDCOLUMNS( CALENDAR(DATE(2021,1,1),MAX('Repaired Table'[Date Repaired])) ,"Week",WEEKNUM([Date],2))

Calendar table.PNG

 

Then create a flag measure to specify which week is fail based on each asset:

Flag = COUNT('Failure Table'[Date Failed])+0

 

Create a matrix visual and apply conditional formatting for both background and font:

Coditional formatting for flag.PNG

 

Turn on Vertical grid and Horizontal grid ,The final output is shown below:

Timeline visualization - weeks with or without a value.PNG

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @ReadTheIron ,

 

I have built a simply data samply as shown below:

Repaired-Failed data sample.PNG

Based on my test, I'd suggest you create a new calendar table and build relationship between it and Failure table like this:

Calendar = ADDCOLUMNS( CALENDAR(DATE(2021,1,1),MAX('Repaired Table'[Date Repaired])) ,"Week",WEEKNUM([Date],2))

Calendar table.PNG

 

Then create a flag measure to specify which week is fail based on each asset:

Flag = COUNT('Failure Table'[Date Failed])+0

 

Create a matrix visual and apply conditional formatting for both background and font:

Coditional formatting for flag.PNG

 

Turn on Vertical grid and Horizontal grid ,The final output is shown below:

Timeline visualization - weeks with or without a value.PNG

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you! It took me a bit to figure out how to make this work with my data set (I am still a very new user) but your breakdown was very clear and helpful!

BA_Pete
Super User
Super User

Hi @ReadTheIron ,

 

You'd need to convert your failures into a number in order to apply them as format conditions.

You could use a measure something like this:

_failureFlag =
IF(
  NOT ISBLANK(yourFailureTable[failureDate]),
  1,
  0
)

Then put this measure into the matrix with your calendar dates as columns.

 

In the conditional formatting options for the matrix, you would apply formatting as RULES, then set the rules based on this measure to 'value is 1' = RED, 'value is 0 = GREEN'.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Hi @ReadTheIron ,

 

You have kudo'd my answer but not given any details as to whether it worked for you or not.

If it worked for you, can you accept as the solution please so others with the same problem can find the correct answer more quickly and easily.

 

Thanks,

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




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