Forum Discussion

PowerBIFreak's avatar
PowerBIFreak
Helper II
3 years ago
Solved

New Column with IF STATEMENT

Hi Folks, I have a table with some columns as below. The print screen below is a table from Power BI. This is perfect if I just want to see each employees' hours on a daily basis. However, I would l...
  • ryan_mayu's avatar
    ryan_mayu
    3 years ago

    PowerBIFreak 

    is this what you want?

     

    Column 2 = if('Table'[Column]="OT", CALCULATE(sum('Table'[Hours]),ALLEXCEPT('Table','Table'[Date],'Table'[Employee]))-8,0)

     

  • ryan_mayu's avatar
    ryan_mayu
    3 years ago

    pls provide the sample data