Forum Discussion

Aliwells632's avatar
Aliwells632
Regular Visitor
1 year ago
Solved

Today line on Gantt chart made form Matrix.

Hello all, 

 

I have a Gantt chart ive made from a matrix, as my company doesnt allow the Gantt chart visualizations. Does anyone know how i can get a today line put into the Chart? 

 

 

  • Hi Aliwells632,

     

    If you need to add a "Today" indicator to a Gantt chart built with a matrix visual in Power BI (without using custom visuals), you can use DAX and conditional formatting as a workaround. Start by creating a calculated column in your Date table, such as IsToday = IF('Date'[Date] = TODAY(), 1, 0), to flag the current date. Next, add a column like TodayMarker = IF('Date'[Date] = TODAY(), "●", BLANK()) to show a marker (such as ●, |, or "Today").
    In your matrix, place tasks as rows and dates as columns, and use TodayMarker as the value. This will add a marker under today’s date. You can also use conditional formatting to highlight the today column, making it more visible. While it won’t create a vertical line, this method makes today’s date easy to spot in your matrix Gantt chart.

    Thank you.

3 Replies

  • v-sgandrathi's avatar
    v-sgandrathi
    Community Support

    Hi Aliwells632,

     

    If you need to add a "Today" indicator to a Gantt chart built with a matrix visual in Power BI (without using custom visuals), you can use DAX and conditional formatting as a workaround. Start by creating a calculated column in your Date table, such as IsToday = IF('Date'[Date] = TODAY(), 1, 0), to flag the current date. Next, add a column like TodayMarker = IF('Date'[Date] = TODAY(), "●", BLANK()) to show a marker (such as ●, |, or "Today").
    In your matrix, place tasks as rows and dates as columns, and use TodayMarker as the value. This will add a marker under today’s date. You can also use conditional formatting to highlight the today column, making it more visible. While it won’t create a vertical line, this method makes today’s date easy to spot in your matrix Gantt chart.

    Thank you.

    • Aliwells632's avatar
      Aliwells632
      Regular Visitor

      ive added the columns to my date table. 

      But it wont let me add two values to the table

       

      • v-sgandrathi's avatar
        v-sgandrathi
        Community Support

        Hi Aliwells632,

         

        Display Both Task Progress and Today Marker in One Column:

        Power BI matrix visuals usually support only one value field, so you can combine your task progress and Today marker into a single column using DAX.

        How to Create a Combined Display Column:

        In your data model, add a new calculated column as follows:

        CombinedDisplay =

        VAR IsToday = IF('Date'[Date] = TODAY(), "●", "")

        VAR TaskValue = [YourTaskProgressColumn] -- Replace this with your actual task value column

        RETURN

        IF(IsToday <> "", IsToday, TaskValue)

        This will display the ● marker for today’s date, and the task progress value for other dates.

        Using This Column in the Matrix:

        Set CombinedDisplay as the value field in your matrix visual. This will show either the task progress or the Today marker, depending on the date.

        To highlight today, use Conditional Formatting on the matrix and set background or font color formatting based on the IsToday column.

         

        Thank you.