Forum Discussion

olimilo's avatar
olimilo
Icon for Post Prodigy rankPost Prodigy
2 months 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'...
  • MFelix's avatar
    2 months ago

    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.

  • Rupa01's avatar
    2 months ago

    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