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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Anonymous
Not applicable

Last Date Modified (Column vs Column)

Hello,

 

I have a data set with items and their contract price. These contracts are modified by either the branch or the corporate headquarters. These are each in different columns. I would like to pull the last time the item was modified, regardless of where it was modified. ie, given the sample data, I want to create that last column in BI where it picks the last date between the two.

 

ItemLast Modified - CorporateLast Modified - BranchLast Modified
A10/1/2014 10/1/2014
B12/3/2013 12/3/2013
C1/15/20153/8/20141/15/2015
D3/4/20124/9/20134/9/2013
E5/10/20156/10/20145/10/2015
F 5/10/20135/10/2013
G 10/5/201510/5/2015

 

Thanks for any help!

1 ACCEPTED SOLUTION
th3h0bb5
Resolver II
Resolver II

You should be able to do this with a nested IF statement to see which column has the older date. The first two IF statements check to see if the column is blank. If they are, it returns the other column. The final IF statement compares the two columns if they're not blank and gives you the older one.

 

lastMod = IF(ISBLANK([Last Modified - Branch]),[Last Modified - Corporate], IF(ISBLANK(Table1[Last Modified - Corporate]),[Last Modified - Branch], IF([Last Modified - Branch]<=[Last Modified - Corporate],[Last Modified - Branch], [Last Modified - Corporate])))

View solution in original post

2 REPLIES 2
th3h0bb5
Resolver II
Resolver II

You should be able to do this with a nested IF statement to see which column has the older date. The first two IF statements check to see if the column is blank. If they are, it returns the other column. The final IF statement compares the two columns if they're not blank and gives you the older one.

 

lastMod = IF(ISBLANK([Last Modified - Branch]),[Last Modified - Corporate], IF(ISBLANK(Table1[Last Modified - Corporate]),[Last Modified - Branch], IF([Last Modified - Branch]<=[Last Modified - Corporate],[Last Modified - Branch], [Last Modified - Corporate])))

Anonymous
Not applicable

@th3h0bb5

I had tried that and it didn't work... Turns out one of my date categories was formatted as a text. Smiley Mad

 

Thanks for your help

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.