Forum Discussion
WEARLE
2 years agoFrequent Visitor
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...
- 2 years ago
WEARLE , Assume you have measure [Outstanding Task]
Join date of you table with a date table and create measure
calculate([Outstanding Task], previousday(date[Date]) )
Day Intelligence - Last day, last non continous day
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c3243d1f9 - 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())RETURNresultand obtain your resultIf this post isuseful to help you to solve your issue consider giving the post a thumbs up and accepting it as a solution !
serpiva64
Solution Sage
2 years agoHi,
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 !