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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.