Forum Discussion

Juliecal73's avatar
Juliecal73
Icon for Helper III rankHelper III
6 years ago
Solved

Burn Down Chart Cuts Short

I don't know what I am missing.... I'm trying to create a burn down chart for Projects. I have a Project Details table, Time Listing table and a Calendar table. The Project table has the Start and ...
  • Juliecal73's avatar
    6 years ago

    I managed to solve this. It seems it I needed to calculate my values referencing the calendar data

     

     

    VAR PlannedHours = CALCULATE(SUM('USA ProjectDetails'[PlannedHours]), DATESYTD('@Calendar'[Date]))

     

     

    My full measure looks like this

     

     

    #Burndown Planned = 
    VAR ProjectStart = CALCULATE(MIN('USA ProjectDetails'[Project Planned Start]), DATESYTD('@Calendar'[Date]))
    VAR ProjectEnd = CALCULATE(MAX('USA ProjectDetails'[Project Planned End]), DATESYTD('@Calendar'[Date]))
    VAR PlannedHours = CALCULATE(SUM('USA ProjectDetails'[PlannedHours]), DATESYTD('@Calendar'[Date]))
    VAR DaysInProject = CALCULATE(DATEDIFF(ProjectStart,ProjectEnd,DAY))
    VAR PlannedBurn = CALCULATE(PlannedHours / DaysInProject)
    VAR DaysSinceStart = CALCULATE(DATEDIFF(ProjectStart,MAX('@Calendar'[Date]),DAY))
    VAR CurrentPlannedBurn = PlannedBurn * DaysSinceStart
    RETURN
    IF(
        MAX('@Calendar'[Date]) >= ProjectStart && MAX('@Calendar'[Date]) <= ProjectEnd,
        PlannedHours - (DaysSinceStart * (PlannedHours/DaysInProject)),
        BLANK()
    )