Forum Discussion

Sk1X1's avatar
Sk1X1
Frequent Visitor
8 years ago
Solved

Simplification of calculation values for X months back

Helo guys, I want to calculate duration of tasks for every month last year. Now I ended with 12 calculated tables. Every table is calculated from source table and filter tasks, that are not created ...
  • Anonymous's avatar
    Anonymous
    8 years ago

    HI Sk1X1,

     

    I think you can add task column to formula as one of group columns, please try to use below formula if it works for your scenario.

     

    Calculate Tables =
    CALCULATETABLE (
        SELECTCOLUMNS (
            DevBugs;
            "ID"; DevBugs[ID];
            "Tasks"; DevBugs[Tasks];
            "Created"; DevBugs[Created];
            "Finished"; DevBugs[Finished]
        );
        FILTER (
            DevBugs;
            DevBugs[Created]
                < DATE ( YEAR ( DevBugs[Created] ); MONTH ( DevBugs[Created] ) + 1; 1 )
                    - 1
        );
        FILTER ( DevBugs; DevBugs[Finished] >= DevBugs[Datum vytvoření] )
    )
    

     

    Regards,

    Xiaoxin Sheng