In Power Query, you can calculate the difference between two dates using the Duration.Days() M function.