Forum Discussion

pbmartin's avatar
pbmartin
New Member
8 years ago

Gantt Chart with Measure

PowerBI Newbie here.  With an Excel table as by datasource, I would like to build a Gantt chart that aggregates Task Category then shows the minimum Start Date and a Duration that is the difference between the minimum Start Date and the maximum End Date of all the Tasks that have the Task Category. I set up a Measure to calculate the minimum Start Date, but the Power BI Gantt Chart won't allow me to use it as the Start Date.  The DAX for the measure (named "Start") is "Start = DATEVALUE(MIN(Tasks[In-Home]))".  What am I doing wrong?

2 Replies

  • Measures have to be with aggregate calculations. Datevalue (if it’s even a Dax function) is a discrete calculation. Should just simply be

    "Start = MIN(Tasks[In-Home]) // assumes Tasks[In-Home] is a date.
    • v-huizhn-msft's avatar
      v-huizhn-msft
      Microsoft Employee

      Hi Seward12533,

      Due to the nature of Gantt Chart, a start date for each task is essential. So we can not use a measure in a start-date level, we must put a column there. It's a truth after test. Please rethink your sample data and feature of Gantt Chart.

      Best Regards,
      Angelia