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
Hi, I have 2 different tables, one date table 'Datum"[Date] and one table showing a quantity 'T_Part[InvQty] on a certain date of a certain partcode 'T_Part[Partcode]', both tables are related by date. If a date is not shown in table T_Part I want it to look up the last InvQty of that part. In this case 15-12-2021 until 21-12-2021 should display 759.70, 25-12-2021 and further should display 687.28. I have found many topic about this but can't find anything that works for me.
If someone could help me out it would be great!
@ddijstelbloem 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 basic pattern is:
Column =
VAR __Current = [Value]
VAR __PreviousDate = MAXX(FILTER('Table','Table'[Date] < EARLIER('Table'[Date])),[Date])
VAR __Previous = MAXX(FILTER('Table',[Date]=__PreviousDate),[Value])
RETURN
__Current - __Previous
Please see the below detailed tutorial on this. Hope this helps.
Fill Last Non Blank Value in a Table in PowerBI using a Measure | MiTutorials
Regards
Mohammed Ismail
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 33 | |
| 29 | |
| 24 |
| User | Count |
|---|---|
| 126 | |
| 115 | |
| 85 | |
| 69 | |
| 69 |