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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.