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
IF LOOKUP(MIN([ID]),0) = LOOKUP(MIN([ID]),-1)
Solved! Go to Solution.
Hi @Anonymous ,
According to your description, refer to the following formula whether to meet your going:
col_new =
VAR _max =
CALCULATE (
MAX ( 'Table'[Date] ),
FILTER (
ALL ( 'Table' ),
'Table'[ID] = EARLIER ( 'Table'[ID] )
&& 'Table'[Date] < EARLIER ( 'Table'[Date] )
)
)
RETURN
DATEDIFF ( _max, 'Table'[Date], DAY )
If the problem is still not resolved, please point it out. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
According to your description, refer to the following formula whether to meet your going:
col_new =
VAR _max =
CALCULATE (
MAX ( 'Table'[Date] ),
FILTER (
ALL ( 'Table' ),
'Table'[ID] = EARLIER ( 'Table'[ID] )
&& 'Table'[Date] < EARLIER ( 'Table'[Date] )
)
)
RETURN
DATEDIFF ( _max, 'Table'[Date], DAY )
If the problem is still not resolved, please point it out. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , a new column
var _max = maxx(filter(Table, [ID] = earlier([ID]) && [Date] < earlier([Date]) ), [Date])
return
datediff(_max, [Date], day)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 35 | |
| 34 | |
| 33 | |
| 27 |
| User | Count |
|---|---|
| 136 | |
| 96 | |
| 77 | |
| 67 | |
| 65 |