Forum Discussion

olimilo's avatar
olimilo
Post Prodigy
1 month ago
Solved

Measure returning incorrect value

I am trying to compute for the utilization of our analysts, using the following measures:

 

~Work Prod = SUM('Data'[Prod])

~Worked Days = 
    COUNTROWS(
        FILTER('Calendar', NOT('Calendar'[Weekday] IN {"Sunday", "Saturday"}))
    )

~Utilization % = 
    VAR WorkDays = [~Work Days]

    RETURN
        DIVIDE(SUM('Data'[Prod]), WorkDays * 420)

 

However, upon checking our matrix, it isn't showing the correct output. For example,

- Analyst 1 / Jun 2026: 13295 Work Prod / (20 Worked Days * 420) = 158%

- Analyst 1 / Jul 2026: 5740 / (18 * 420) = 76%

- Analyst 2 / Jul 2026: 3530 / (15 * 420) = 56%

 

 

Does anyone know how we can get the correct quotient? This is how the data is structured:

 

  • Hi olimilo ,

     

    I tried the same on my side and got the correct calculation one thing that I have tried is to make the calculation reverse and try to identify what value could be incorrect and always got the the number of days is 22,so I assume you may have some impact on the calculation of the calendar date.

     

    Easist fix is to use visual calculation instead of the Measure since you can simply do the division based on the two columns you have on your visual.

     

    https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-visual-calculations-overview

     

     

    Concerning your dax with the current information I do not see any problem what you may try is to check if the workdays are getting properly calculated when using the VAR option (no reason to think not. You can also try to call the Work Prod instead of doing the sum- 

    ~Utilization % = 
        VAR WorkDays = [~Work Days]
    
        RETURN
            DIVIDE([~Work Prod], WorkDays * 420)

     

    Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.

    If the information is sensitive please share it trough private message.

  • Hi olimilo,

    I'm able to get the exact result using below measure. Please share sample data or pbix file if this doesn't work. 

    ~Utilization % = DIVIDE([~Work Prod], [~Worked Days] * 420)

     

    πŸ’‘ Helpful? Give a Kudos πŸ‘ β€” keep the community growing
    βœ… Solved your issue? Mark as Solution βœ”οΈ β€” help others find it faster

    Best regards,
    Rupasree Achari | BI & Fabric Analytics Engineer

6 Replies

  • Rupa01's avatar
    Rupa01
    Solution Sage

    Hi olimilo,

    I'm able to get the exact result using below measure. Please share sample data or pbix file if this doesn't work. 

    ~Utilization % = DIVIDE([~Work Prod], [~Worked Days] * 420)

     

    πŸ’‘ Helpful? Give a Kudos πŸ‘ β€” keep the community growing
    βœ… Solved your issue? Mark as Solution βœ”οΈ β€” help others find it faster

    Best regards,
    Rupasree Achari | BI & Fabric Analytics Engineer
  • Hi olimilo ,

     

    I tried the same on my side and got the correct calculation one thing that I have tried is to make the calculation reverse and try to identify what value could be incorrect and always got the the number of days is 22,so I assume you may have some impact on the calculation of the calendar date.

     

    Easist fix is to use visual calculation instead of the Measure since you can simply do the division based on the two columns you have on your visual.

     

    https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-visual-calculations-overview

     

     

    Concerning your dax with the current information I do not see any problem what you may try is to check if the workdays are getting properly calculated when using the VAR option (no reason to think not. You can also try to call the Work Prod instead of doing the sum- 

    ~Utilization % = 
        VAR WorkDays = [~Work Days]
    
        RETURN
            DIVIDE([~Work Prod], WorkDays * 420)

     

    Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.

    If the information is sensitive please share it trough private message.

  • Hi,

    Does this work

    ~Worked Days = calculate(countrows('calendar'),'Calendar'[Weekday]<>"Saturday"&&'Calendar'[Weekday]<>"Sunday") * 420
  • v-achippa's avatar
    v-achippa
    Community Support

    Hi olimilo,

     

    Thank you for reaching out to Microsoft Fabric Community.

     

    Thank you MFelixRupa01ryan_mayu and Ashish_Mathur and  for the prompt response.

     

    As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user's for the issue worked?  

    If not provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

    Do not include sensitive information or anything unrelated to the issue or question. Also, show the expected outcome based on the sample data you provided.

     

    Thanks and regards,

    Anjan Kumar Chippa

     

    • v-achippa's avatar
      v-achippa
      Community Support

      Hi @olimilo,

       

      We wanted to kindly follow up to check if the solution provided by the user's for the issue worked?  

      If not provide sample data that covers your issue or question completely, in a usable format. Do not include sensitive information or anything unrelated to the issue or question. 

       

      Thanks and regards,

      Anjan Kumar Chippa