Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello, I am trying to create a calculated column to track day-to-day changes to claims. The highlighted Change column is the objective. I want to compare the Claim # to only the prior working day report to track the changes. I provided a simplified version of the data below. The Change column for 4/22/20 can be blank because it is the starting point thus no prior report to compare.
Solved! Go to Solution.
hi @Anonymous
You could use this logic to get it:
Change =
var _firstdate=CALCULATE(MIN('Table'[Report Date]),ALL('Table'))
var _perdate=CALCULATE(MAX('Table'[Report Date]),FILTER('Table','Table'[Report Date]<EARLIER('Table'[Report Date])))
var _perclaimstatus=CALCULATE(MAX('Table'[Status]),FILTER('Table','Table'[Report Date]=_perdate&&'Table'[Claim #]=EARLIER('Table'[Claim #])))
return
IF (
_firstdate = 'Table'[Report Date],
BLANK (),
IF (
CALCULATE (
MAX ( 'Table'[Claim #] ),
FILTER (
'Table',
'Table'[Report Date] = _perdate
&& 'Table'[Claim #] = EARLIER ( 'Table'[Claim #] )
)
)
= BLANK (),
"New",
IF (
'Table'[Last Saved Date] = BLANK ()
&& _perclaimstatus <> 'Table'[Status],
'Table'[Status],
IF (
_perclaimstatus = 'Table'[Status]
&& 'Table'[Last Saved Date] < _perdate,
"No Change",
IF (
_perclaimstatus = 'Table'[Status]
&& 'Table'[Last Saved Date] >= _perdate,
"Updated"
)
)
)
)
)
Result:
and here is sample pbix file, please try it.
Regards,
Lin
hi @Anonymous
You could use this logic to get it:
Change =
var _firstdate=CALCULATE(MIN('Table'[Report Date]),ALL('Table'))
var _perdate=CALCULATE(MAX('Table'[Report Date]),FILTER('Table','Table'[Report Date]<EARLIER('Table'[Report Date])))
var _perclaimstatus=CALCULATE(MAX('Table'[Status]),FILTER('Table','Table'[Report Date]=_perdate&&'Table'[Claim #]=EARLIER('Table'[Claim #])))
return
IF (
_firstdate = 'Table'[Report Date],
BLANK (),
IF (
CALCULATE (
MAX ( 'Table'[Claim #] ),
FILTER (
'Table',
'Table'[Report Date] = _perdate
&& 'Table'[Claim #] = EARLIER ( 'Table'[Claim #] )
)
)
= BLANK (),
"New",
IF (
'Table'[Last Saved Date] = BLANK ()
&& _perclaimstatus <> 'Table'[Status],
'Table'[Status],
IF (
_perclaimstatus = 'Table'[Status]
&& 'Table'[Last Saved Date] < _perdate,
"No Change",
IF (
_perclaimstatus = 'Table'[Status]
&& 'Table'[Last Saved Date] >= _perdate,
"Updated"
)
)
)
)
)
Result:
and here is sample pbix file, please try it.
Regards,
Lin
Thank you! I made some minor edits and it works as I intended.
See my article on Mean Time Between Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/3395...
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |