Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago

Inccorect Power BI calculation vs Manual calculation

Hi,

I got issue with the Annualized % calculation where Power BI calculate wrongly for NZ but overall and HK is correct.

For NZ Jan, calculation should be 6/53*366/31 = 1.3365  (133.65%) but Power BI value is 134.9%

Can i know what is the issue ?

 

Refer the sceershot is manual excel sheet. For overall, NZ and HK

 

Please refer these dax formula :

Attrition YTD = CALCULATE(sum(Attrition[Count]),DATESYTD('DAX DateTable'[Date]))
Average HC = ([Fiscal Year HC]+[HC])/
Fiscal Year HC = sum('Fiscal Year HC'[Count of Employee Type])
HC = count(ActiveHC[Active])
 YTD Count = TOTALYTD(sum('DAX DateTable'[Count]),'DAX DateTable'[Date])
Annualized % = [Attrition YTD]/[Average HC]*366/[YTD Count]
 
Power BI
 

 

 

3 Replies

  • _AAndrade's avatar
    _AAndrade
    Resident Rockstar

    Hi Anonymous,

    Could you see if your Average HC have decimal places? Probably you have 52.512 and for that reason you're getting wrong numbers.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi _AAndrade ,

     

    For Average HS will be whole number data type which is 53.

    • _AAndrade's avatar
      _AAndrade
      Resident Rockstar

      Hi Anonymous;

      Isn't it a calculation? If it's a average could have decimal places. If you change the data type to decimal you don't have any decimal places?