Forum Discussion

bwasham's avatar
bwasham
Frequent Visitor
7 years ago
Solved

Calculated Column with Var and IF Then Else

I am trying to create a matrix in Power BI with a column for Full Time Equivalents (FTE).  The Table looks like this (Please note this is an example the actual table has well over a million lines for...
  • Greg_Deckler's avatar
    7 years ago

    I would approach this as 3 measures:

     

    August = 186 
    
    FTE1Measure = 
    VAR __FTE = DIVIDE(SUM(Table8[Hours]),[August])
    RETURN IF(__FTE>1,1,__FTE)
    
    FTEMeasure = 
    IF(HASONEVALUE('Table8'[Staff]),[FTE1Measure],SUMX(SUMMARIZE('Table8',[Staff],"__FTE",[FTE1Measure]),[__FTE]))

    FTEMeasure is the one that you want to use, the other two are just intermediate.