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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
derekli17001
Helper I
Helper I

How to make Timeline text turn yellow once a data is reached?

Hello - i am using the Timeline by Queryon Visual and have this table as my data:

CustomerDateDescription
A14/12/2026Contract end
B31/08/2026Contract end
C30/11/2026Contract end


Is it possible to make the Description text turn to red/orange colour once we enter within the 1 year range of the "Date"?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,@derekli17001 ,I am glad to help.
According to your description, you want to change the Description of the records within the last one year to another colour in order to highlight them?
If I understand you correctly, then you can refer to my solution.

Here is the test data I created.

vjtianmsft_0-1714373569127.png

 


I created a calculated column to show the number of days difference between each row of data and the current point in time
If this value is less than or equal to 365 days, then the record needs to be color coded.
I then created a measure that does the same thing, (the calculated column I just created to explain the basic idea)
If the difference is less than or equal to one year, it is marked as "yellow", otherwise it is not marked with a color

vjtianmsft_1-1714373634487.png

Here is the DAX code:

M_ =
VAR tableDate =
MIN ( 'YourTable'[t_Date] )
VAR nowData =
TODAY ()
VAR differ =
DATEDIFF ( nowData, tableDate, DAY )
RETURN
IF ( differ <= 365, "yellow", IF ( differ > 365, "" ) )

Use table to display the data, and then according to Visualizations in the Cell elements to dynamically set the style, here I set the background.

vjtianmsft_2-1714373732492.png
Choose to change the style of "Description".

vjtianmsft_3-1714373786930.png

Here the choice is to change the color according to the value of M_ (just set to show yellow if the number of days is less than or equal to 365)

vjtianmsft_4-1714373802208.png

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

Best Regards,
Carson Jian,
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

1 REPLY 1
Anonymous
Not applicable

Hi,@derekli17001 ,I am glad to help.
According to your description, you want to change the Description of the records within the last one year to another colour in order to highlight them?
If I understand you correctly, then you can refer to my solution.

Here is the test data I created.

vjtianmsft_0-1714373569127.png

 


I created a calculated column to show the number of days difference between each row of data and the current point in time
If this value is less than or equal to 365 days, then the record needs to be color coded.
I then created a measure that does the same thing, (the calculated column I just created to explain the basic idea)
If the difference is less than or equal to one year, it is marked as "yellow", otherwise it is not marked with a color

vjtianmsft_1-1714373634487.png

Here is the DAX code:

M_ =
VAR tableDate =
MIN ( 'YourTable'[t_Date] )
VAR nowData =
TODAY ()
VAR differ =
DATEDIFF ( nowData, tableDate, DAY )
RETURN
IF ( differ <= 365, "yellow", IF ( differ > 365, "" ) )

Use table to display the data, and then according to Visualizations in the Cell elements to dynamically set the style, here I set the background.

vjtianmsft_2-1714373732492.png
Choose to change the style of "Description".

vjtianmsft_3-1714373786930.png

Here the choice is to change the color according to the value of M_ (just set to show yellow if the number of days is less than or equal to 365)

vjtianmsft_4-1714373802208.png

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

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




 






Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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