Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Lautorp
Frequent Visitor

Inserting lastest purchase date in tabel

I'm trying to get the most recent date of my purchase in on my table showing my products on stock. 

 

I would like to show my latest purchase date on each item listed in my stock report, so I have a complete overview on how old my stock is.

 

I have tried with LASTDATE or MAX, but can't seem to make it work. 

 

All my purchase data is located in my table LAGPOST (2).

 

Any good suggestions?

 

Udklip.JPG

1 ACCEPTED SOLUTION
iamprajot
Responsive Resident
Responsive Resident

This solution is OK and working on my data.

Just try to create the table from scratch and you can use matrix table too for clear understanding.

Also, there is an alternate formula which is similar,

Measure =LASTNONBLANK(TableName[Date],MAX(TableName[Date]))

and you can also put the Date Column into the Table and Choose Latest

View solution in original post

3 REPLIES 3
Zubair_Muhammad
Community Champion
Community Champion

Hi @Lautorp

 

Try this pattern

 

=
CALCULATE (
    MAX ( TableName[Date] ),
    ALLEXCEPT ( TableName, TableName[Products] )
)

Regards
Zubair

Please try my custom visuals

It looks like it just return the higest number in the date coloum. 

 

Udklip.JPG

iamprajot
Responsive Resident
Responsive Resident

This solution is OK and working on my data.

Just try to create the table from scratch and you can use matrix table too for clear understanding.

Also, there is an alternate formula which is similar,

Measure =LASTNONBLANK(TableName[Date],MAX(TableName[Date]))

and you can also put the Date Column into the Table and Choose Latest

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.