Forum Discussion

smstrickland's avatar
smstrickland
Helper I
6 years ago
Solved

DAX formula Help

I have a report with 2 tables: 'Timesheet_Cell' and 'Timesheet_Line_History.' The 'Timesheet_Cell' table contains hours entered into timesheets per day (applicable fields are [Entered_HRS] and [HRS_D...
  • v-juanli-msft's avatar
    v-juanli-msft
    6 years ago

    Hi smstrickland 

    Relationship as below

    Create measures

     

    new hours = SUM(Timesheet_Cell[ENTERED_HRS])+0.0
    
    post hours =
    CALCULATE (
        SUM ( Timesheet_Line_History[ENTERED_HRS] ) + 0.0,
        FILTER (
            Timesheet_Line_History,
            Timesheet_Line_History[TS_DT]
                <= MAX ( 'date'[Date] )
                && Timesheet_Line_History[TS_DT]
                    >= MIN ( 'date'[Date] )
        )
    )
    

     

    Best Regards
    Maggie
    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.