How to color code current date in a Table

Hi @Khaiboon,

Sorry i don’t have time to create a file for you.

Are you using an EDNA date table? All project should have a date table.
Here are the links that Melissa have provide to the community.
Summary - Melissa - Enterprise DNA Forum
Extended Date Table (Power Query M function) - Power Query / M Code Showcase - Enterprise DNA Forum

Here is another option:

This is what i got from EDNA AI within Data Mentor

Creating Dynamic Color Formatting in Power BI

To create a different color code for the current date and make it dynamic as the date passes in a Power BI visual, you can follow these steps:

  1. Create a new column in your date table to identify the current date.
  2. Utilize conditional formatting in Power BI visualizations to apply different background color based on the current date.

Step 1: Create a New Column for Current Date

You can use DAX to create a new column in your date table that flags the current date. Suppose your date table is called DateTable and it includes a column Date, you can create a new column IsCurrentDate:

IsCurrentDate = IF(DateTable[Date] = TODAY(), 1, 0)

Copy

Step 2: Apply Conditional Formatting in Power BI

In your Power BI report:

  • Select the visual you want to apply the color formatting to.
  • Go to the formatting options of the visual.
  • Find the conditional formatting settings.
  • Choose the Background Color option.
  • Set a rule using the IsCurrentDate column you created.
  • Select the desired color for the current date.

By following these steps, you can create a Power BI visual where the background color changes dynamically for the current date.

Please have Data Mentor to help you too.

thanks
Keith