Forum Discussion

Batman_powerbi's avatar
Batman_powerbi
Frequent Visitor
1 year ago
Solved

% of Role Utilisation per project

Hi All

 

need some help. maybe i am looking into it too much but been struggling to come up with a calculation correctly

 

below is sample data, my main data source has approx 15 different columns but the main data i need to drive from are the 5 columns in sample data

 

PROJECT     ROLE       DATE              HOURS     FY            
Project 1BA23-Sep-245FY25
Project 1PM23-Sep-243FY25
Project 1PM23-Sep-242FY25
Project 1Tester23-Sep-242FY25
Project 1Dev23-Sep-241FY25
Project 1Admin23-Sep-245FY25
Project 1BA24-Sep-246FY25
Project 1PM24-Sep-247FY25
Project 1Tester24-Sep-246FY25
Project 1Dev24-Sep-245FY25
Project 1Admin25-Sep-243FY25
Project 1BA25-Sep-244FY25
Project 1BA26-Sep-245FY25
Project 1PM26-Sep-247FY25
Project 1Tester26-Sep-243FY25
Project 1Dev28-Sep-241FY25
Project 2Dev21-Sep-245FY25
Project 2PM22-Sep-244FY25
Project 2BA23-Sep-241FY25
Project 2Tester24-Sep-246FY25
Project 2BA25-Sep-247FY25
Project 2BA26-Sep-244FY25
Project 2BA27-Sep-245FY25
Project 2Tester28-Sep-248FY25
Project 2Admin29-Sep-249FY25
Project 2BA30-Sep-241FY25
Project 2Dev1-Oct-242FY25
Project 2BA2-Oct-241FY25
Project 2Tester3-Oct-244FY25
Project 4Dev24-Sep-245FY25
Project 4Admin25-Sep-243FY25
Project 4BA25-Sep-244FY25
Project 4BA26-Sep-245FY25
Project 4PM26-Sep-247FY25
Project 4Tester26-Sep-243FY25
Project 4Dev28-Sep-241FY25
Project 3Admin29-Sep-249FY25
Project 3BA30-Sep-241FY25
Project 3Dev1-Oct-242FY25
Project 3BA2-Oct-241FY25
Project 3BA3-Oct-244FY25

 

as you can see, a single role can have multiple entries against a project on same or different days

 

what i am trying to achieve is a calculation on the ultisaltion of the role against the projects in the list and the total and average hours logged for that project and FY

for example in the sample data, the "tester" is not allocated against project 3 but is allocated against projects 1,2 & 4. hence the calculation would be the tester is used across 75% across all total projects

 

then i am trying to calculate, the average hours for that role for that project.

 

Essentially wish for the output to look like the below

Role          

Count of times role was

used across all Projects         

% Allocation across

projects                      

Total hours         Average Hours        
BA    
Tester375%32 hrs10.7 hrs
PM    
Admin    

 

hopefully this makes sense

  • rajendraongole1's avatar
    rajendraongole1
    1 year ago

    Hi Batman_powerbi -can you please create below measures:

     

    DistinctProjectsPerRole = DISTINCTCOUNT(prodj[PROJECT])
     
    Total number of projects:
    TotalProjects = CALCULATE(DISTINCTCOUNT(prodj[PROJECT]), ALL(prodj))
     
    %allocation measure as below:
    PercentAllocation = DIVIDE([DistinctProjectsPerRole], [TotalProjects])
     

     

    Hope this helps. Please check.

5 Replies

  • Hi Batman_powerbi -you can calculate the count of times each role is used across projects, their percentage allocation across all projects

    measure 1: 

    Count of Projects per Role =
    CALCULATE(
        DISTINCTCOUNT('prodj'[PROJECT]),
        ALLEXCEPT('prodj', 'prodj'[ROLE])
    )
     

     

    Measure2 for allocation%
    % Allocation =
    DIVIDE(
        [Count of Projects per Role],
        DISTINCTCOUNT('prodj'[PROJECT]),
        0
    )
     
    Measure 3: 
    Total Hours per Role =
    CALCULATE(
        SUM('prodj'[HOURS]),
        ALLEXCEPT('prodj', 'prodj'[ROLE])
    )
     
    Measure 4: 
    calculate the average hours each role has spent on each project.
     
    Average Hours per Role =
    DIVIDE(
    [Total Hours per Role],
    [Count of Projects per Role],
    0
    )
     

     

    Hope the above measures helps to create the required report.

     
     
    • Batman_powerbi's avatar
      Batman_powerbi
      Frequent Visitor

      rajendraongole1 

      thankyou for the help

       

      based on your calculation the Measure 2 is 100%, it should be the calculation against the total of projects

       

      for the tester, as per the example, the correct output is 75% as the "Tester" has been used on 3 out of 4 projects. 

      another example, in my real data, i have a BA whom has been used across 22 projects out of a possible 43 for the FY which would be a calculation of 51.16%

      • rajendraongole1's avatar
        rajendraongole1
        Icon for Super User rankSuper User

        Hi Batman_powerbi -can you please create below measures:

         

        DistinctProjectsPerRole = DISTINCTCOUNT(prodj[PROJECT])
         
        Total number of projects:
        TotalProjects = CALCULATE(DISTINCTCOUNT(prodj[PROJECT]), ALL(prodj))
         
        %allocation measure as below:
        PercentAllocation = DIVIDE([DistinctProjectsPerRole], [TotalProjects])
         

         

        Hope this helps. Please check.