cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ExcelPBI
Post Patron
Post Patron

Conditional replace values

Hi Community,

 

My data set has data quality issues. In the follwoing sample data set, how can I replace end_date 1/01/1900 with end_date from the row where E_key ,Client_key & program are the same but val = 3 & comment is not null:

 

ExcelPBI_0-1634877421850.png

 

Many thanks!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@ExcelPBI , a new column

New column =

var _1 = maxx(filter(Table, [E_key] = earlier([E_key) && [End_date] >date(1900,01,01) ), [End Date] )

return

if( [End_date] = date(1900,01,01), _1, [End_date])

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@ExcelPBI , a new column

New column =

var _1 = maxx(filter(Table, [E_key] = earlier([E_key) && [End_date] >date(1900,01,01) ), [End Date] )

return

if( [End_date] = date(1900,01,01), _1, [End_date])

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.