You can undo the action performed or the last few actions by pressing CTRL+Z.
You will need to click on the data option that is available on the top left, which provides you a drop-down menu, select the type of the data that you are using. It could be excel or anything. Once the data is selected you are allowed to edit the data before you load the same on to Power BI. It is good practice to edit the data by using the filter options or filtered data.