Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Matrix drill-down > subtotal from multiple columns

Hey,   I have a problem showing the correct subtotals in a matrix when drilling down to the next level.   What I have 2 datasets: Tasks, containing - among others - the following columns: Tas...
  • Anonymous's avatar
    Anonymous
    8 years ago

    Anonymous,

    Create the following measures in  the projects table.

    sum of task budget = SUM(tasks[Task Budget])

     

    sum of project budget = CALCULATE(SUM(projects[Project Budget]),FILTER(projects,CALCULATE(COUNTROWS(FILTER(tasks,tasks[Project ID]=RELATED(projects[Project ID])))>0)))
    Budget = IF(ISBLANK([sum of task budget]),[sum of project budget],[sum of task budget])



    Regards,
    Lydia