Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
hoyty
Regular Visitor

SharePoint list - using created date / time in date filter?

The created column in SharePoint is a Date / Time field and when brought into Power BI is seen as a text field rather than a date field. How can you filter on date such as After 2022-09-01 since it isn't seen as a date? Do I need to to a measure or transform to create a calculated column?

1 ACCEPTED SOLUTION
hoyty
Regular Visitor

Replying to myself in case it helps someone else later. Select the column on the far right list. Then at the top change the data type from text to date. Once this is done you can now filter it like a standard date field. Once I figured it out super easy.

hoyty_0-1678813685636.png

 

View solution in original post

3 REPLIES 3
ichavarria
Solution Specialist
Solution Specialist

Hi @hoyty,

 

To filter on date you can create a calculated column to convert the text field to a date field. Here's how you can do it:

  1. Open the Power Query Editor in Power BI by clicking on "Transform Data" in the Home tab of the ribbon.

  2. Select the table that contains the "Created" column.

  3. Right-click on the "Created" column and select "Change Type" > "Using Locale" > "Date/Time".

  4. If the column contains any errors, Power Query will prompt you to correct them.

  5. Once the "Created" column is converted to a date/time data type, click on "Close & Apply" to save the changes.

  6. Now you can create a calculated column by clicking on "New Column" in the Modeling tab of the ribbon.

  7. Use the following formula to create a calculated column that extracts the date from the "Created" column:

    = DATE(YEAR([Created]),MONTH([Created]),DAY([Created]))

  8. Name the calculated column "Created Date" or something similar.

  9. Now you can use the "Created Date" column to filter your data by date, such as filtering for dates after 2022-09-01.

By creating a calculated column that extracts the date from the "Created" column, you can now filter your data based on date values.

 

Best regards, 

Isaac Chavarria

If this post helps, then please consider Accepting it as the solution and giving Kudos to help the other members find it more quickly.

Thanks, the method I found was way easier. Yours might work with dirty data.

hoyty
Regular Visitor

Replying to myself in case it helps someone else later. Select the column on the far right list. Then at the top change the data type from text to date. Once this is done you can now filter it like a standard date field. Once I figured it out super easy.

hoyty_0-1678813685636.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.