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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
GG_7096
New Member

undefined

image001.png

 Good day, I was trying to make a dax to get the previous row value as sample table above. Please advice. Thank u

2 REPLIES 2
some_bih
Super User
Super User

Hi @GG_7096 try this as new column. I hope this help

previous_delivered_Date =
VAR _item=Sheet13[Item]
VAR _deliverydate=Sheet13[delivered_date]
VAR _previous_row=
    CALCULATE(
        MAX(Sheet13[delivered_date]),
        FILTER(Sheet13,
        Sheet13[Item]=_item &&
        Sheet13[delivered_date]<_deliverydate
        )
    )
RETURN _previous_row




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






tamerj1
Super User
Super User

Hi @GG_7096 
Please try

Previous Delivery_Date =
MAXX (
    FILTER (
        CALCULATETABLE (
            VALUES ( 'Table'[Delivery_Date] ),
            ALLEXCEPT ( 'Table', 'Table'[Item] )
        ),
        'Table'[Delivery_Date] < EARLIER ( 'Table'[Delivery_Date] )
    ),
    'Table'[Delivery_Date]
)

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.