Forum Discussion

Isildur13's avatar
Isildur13
Frequent Visitor
1 year ago
Solved

Create running total based on expected daily average

Hi Community! I have tried to wrap my head around how to create a Matrix visual with a measure calculating a form of expected delivered value like a running total.   I have 2 tables; Datetable, ...
  • Selva-Salimi's avatar
    1 year ago

    Hi Isildur13 

     

    your rules are not clear, but lets assume that you expect to deliver same amout on every days of your contract. then you can write a measure as follows:

     

    Measure =
    var _totaldays = DATEDIFF(max('Table'[startdate]) , max('Table'[enddate]),DAY)
    var _passeddays = DATEDIFF(MAX('Table'[startdate]),today(),DAY)
    return
    sum('Table'[totalamount])*_passeddays /_totaldays
     
    If this post helps, then I would appreciate a thumbs up  and mark it as the solution to help the other members find it more quickly.