Forum Discussion

WEARLE's avatar
WEARLE
Frequent Visitor
2 years ago
Solved

Get data form previous day to calculate the difference

Oh hi   I currenly have a smart measure set that gets me data from 1/1/24 as below. I am rubbish at this so is there a way I can alter it so it just gets me the data from the previous day and calcu...
  • serpiva64's avatar
    2 years ago

    Hi,

    you can use offset function.

    create a measure

    Diff using Offset =
    var offsetout =CALCULATE(sum('Table'[Outstanding Tasks]), OFFSET(-1, ALLSELECTED('Table'[Day]), ORDERBY('Table'[Day], asc)))
    var result = if (not ISBLANK(offsetOut), sum('Table'[Outstanding Tasks])-offsetout, BLANK())
    RETURN
    result
    and obtain your result

    If this post isuseful to help you to solve your issue consider giving the post a thumbs up and accepting it as a solution !