Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Calculating Total Project Backlog Per Month

Hello All, new user here looking for some help.   I have a total list of my teams projects, their estimated end date, total fee and Current Spent amount. I am looking to calculate and visualize my ...
  • v-lili6-msft's avatar
    v-lili6-msft
    6 years ago

    HI  Anonymous 

    For your case, you need to add a start date column in your table, like this:

     

    Then try this way as below:

    Step1:

    Create a dim Calendar table

    Eg.

    Calendar = CALENDARAUTO()

     

    Step2:

    create a monthly project Cost column

    monthly project Cost = 'Table'[total project Cost] / (DATEDIFF('Table'[Start Date],'Table'[end date],MONTH)+1)

     

    Step3:

    Create a measure as below:

    Total = 
    VAR tmpCalendar = ADDCOLUMNS('Calendar',"Month",MONTH([Date]),"Year",YEAR([Date]),"MonthYear",VALUE(YEAR([Date]) & FORMAT(MONTH([Date]),"0#")))
    VAR tmpBilling = ADDCOLUMNS('Table',"MonthYearBegin",VALUE(YEAR([Start Date]) & FORMAT(MONTH([Start Date]),"0#")),
                                          "MonthYearEnd",VALUE(YEAR([end date]) & FORMAT(MONTH([end date]),"0#")))
    VAR tmpTable = 
    SELECTCOLUMNS(
        FILTER(
            GENERATE(
                tmpBilling,
                SUMMARIZE(tmpCalendar,[Year],[Month],[MonthYear])
            ),
            [MonthYear] >= [MonthYearBegin] &&
            [MonthYear] <= [MonthYearEnd]
        ),
        "Project",[Project Number ],
        "Year",[Year],
        "Month",[Month],
        "Project Cost",[monthly project Cost]
    )
    RETURN SUMX(tmpTable,[Project Cost])

     

    Result:

    here is a same blog, you could refer to:

    https://community.powerbi.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/409365

     

    and here is my sample pbix file, please try it.

     

    Regards,

    lin