Forum Discussion

gkalandadze's avatar
gkalandadze
Frequent Visitor
7 years ago
Solved

Sales VS Attendance

hello,   got time attendance machine and sales and I would like to see which employee was in office during the particular sale. here is screen how i see it. 
  • Anonymous's avatar
    Anonymous
    7 years ago

    gkalandadze ,

     

    Sorry about that

     

    Change the calculated column as under

     

    Salesmen =
    VAR CurrentTime =
        FORMAT ( Sales[Time], "HH:MM" )
    VAR SalesPerson =
      
                    CALCULATETABLE (
                        SUMMARIZE ( Attendance, Attendance[Employee] ),
                         CurrentTime >=FORMAT ( ( Attendance[IN] ), "HH:MM" ),
                        CurrentTime <=FORMAT ( ( Attendance[OUT] ), "HH:MM" )
                    )
    RETURN
        CONCATENATEX ( SalesPerson, [Employee], "," )
     
     
    Let me know if it works.
     
    Cheers
     
    CheenuSing