Or in the Investing/Portfolio views, you can set up the columns and sorting/grouping order you want, go to File/Print portfolio and select the desired format in Export to: If you choose the .PRN format and then save it with a CSV extension, you will have a comma delimited file suitable for opening in Excel.The "Excel compatible" Tab delimited format forces you to go through the text file import wizard.
Select Reports->Investing->Investment Performance, choose Year to date in the Date range: pull-down menu. If you would like the report organized by security, select Security in the Subtotal by: pull-down-menu. If you want to export the report, select Export.