Forum Discussion

jav226's avatar
jav226
Frequent Visitor
7 years ago
Solved

Computing rollup weighted sum

Seeking assistance from Power BI experts.   I'm trying to compute the overall progress of Program 1, which is sum of each individual Project Progress, based on the weightage assigned for each Proje...
  • d_gosbell's avatar
    d_gosbell
    7 years ago

    So based on your new requirement to apply the weightings differently at different levels you might be able to do something like the following which just dynamically changes the factor inside the SUMX based on which columns are filtered

     

    SUMX( table1, IF(ISFILTERED( table1[Project]), 1,  -- at the project level multiply by 1
        IF( ISFILTERED(Program], [Project Weightage],  -- at the program level apply the project weight
        [Program Weightage] * [Project Weightage])   -- at the total level apply program and project weighting
    * [Progress])