In this post I’ll guide you through a couple of different methods for extracting date data from your data into Microsoft Power BI so that it can be used to help you slice your data. There are a couple of different methods to achieve this which we will cover in a 2 part blog series.
Edit Query Date Extraction:
When you load your data into Power BI you are shown a screen like something in the image below.
What this will do is allow you to edit the data before it’s fully loaded into your model. The next screen is going to ask you if you want to IMPORT or Direct Query the data. We will choose Import.
Once the data has been loaded which may take a while depending upon your data. You will then be brought to a screen as in the image above. This is where you can do a lot of data manipulation before your data has even really been brought into Power BI.
What you will do now is scroll to the column that has your date information in it. In my instance I’m using the PostedDate field which happens to be set as a Date/Time type. The next step is to choose the Add Column from the ribbon at the top. Choose the DATE option and select the portion you wish to extract out. I selected the year option.
When done you should now see an additional column in your dataset.