1. Load your data:
Import your dataset into Power BI.
2. Open Power Query Editor:
Go to the "Home" tab and click on "Transform Data" to open the Power Query Editor.
3. Add Custom Columns:
In the Power Query Editor, select the two column that contains your date values from which you want to calculate difference.
Extract Difference Between Dates:
Go to the "Add Column" tab.
Click on "Date" and then select "Subtract".
This will create a new column with the difference in date.
Extract Earliest Date:
Select the two date columns from which you want to calculate "Earliest Date", go to the "Add Column" tab.
Click on "Date" and then select "Earliest Date".
This will create a new column with the "Earliest Date" extracted from two date columns.
Extract Latest Date:
Select the two date columns from which you want to calculate "Latest Date", go to the "Add Column" tab.
Click on "Date" and then select "Latest Date".
This will create a new column with the "Latest Date" extracted from two date columns.
4. Close and Apply:
Once you have added all the necessary columns, click on "Close & Apply" to apply the changes and return to the main Power BI window.
You should now have separate columns for difference between dates, earliest date and latest date in your dataset.