Forum Discussion

khisla's avatar
khisla
Icon for Helper II rankHelper II
1 year ago
Solved

Calculate Total - Wrong Total Sum

Hello All-   I need to calculate the total hours worked by employees on a particular date AND specific store. See data below and expected total hours column calculated.   Date Store Employe...
  • Jihwan_Kim's avatar
    1 year ago

    Hi,

    Please check the below picture and the attached pbix file.

    It is for creating a calculated column.

     

     

     

    CC Total Hours = 
    VAR _date = Data[Date]
    VAR _store = Data[Store]
    VAR _t =
        FILTER ( Data, Data[Date] = _date && Data[Store] = _store )
    RETURN
        SUMX ( _t, Data[Hours Worked] )