Forum Discussion

yazoubi's avatar
yazoubi
Frequent Visitor
4 years ago
Solved

Applying calculate with filter

Hi Dears,  Can someone help me please to do a calculation for total staying in accommodation based on movement type (check-in/check-out) and consider the other filter like per user number  and per r...
  • amitchandak's avatar
    amitchandak
    4 years ago

    yazoubi , parenthesis are wrong place  , Please check my doubts

     

    Datediff(
    calculate(min(Table[Date Time]), allexcept(Table,Table[Requester], Table[Accommodation], Table[User]), filter(Table, Table[Movement type] ="Check-In"))
    , calculate(Max(Table[DAte Time]), allexcept(Table,Table[Requester], Table[Accommodation], Table[User]), filter(Table, Table[Movement type] =" Check-Out"))
    , day)

     

    Or Paste the formula in text format