Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi
I have 2 columns start date and end date where i have end dates lesser than start dates. If my end date is before start date I want to replace end date with start date value, thereby the difference between start and end dates = 0. I found creating measure using DateDiff in power bi for this purpose but I want to clean this in power query. How to do it.?
I was unable to give column values in Replace option under end_date column. It is accepting only distinct values present in the data.
Solved! Go to Solution.
@sam89 Create a new column (Add Column)
= if [end date] < [start date] then [start date] else [end date]
Then remove your end date column and rename the new column to end date.
@sam89 Create a new column (Add Column)
= if [end date] < [start date] then [start date] else [end date]
Then remove your end date column and rename the new column to end date.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!