The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.