Closed Thread
Results 1 to 2 of 2

Power Query error handling in date column

  1. #1
    Registered User
    Join Date
    07-27-2020
    Location
    Manchester, UK
    MS-Off Ver
    Office 365
    Posts
    21

    Power Query error handling in date column

    Morning all - seriously hoping that someone can help with a PQ issue that is causing me a lot of headaches...

    I run a SharePoint site containing >5000 files, and each file contains custom Properties that inform me of the status of each respective file. Every day I run a PQ from a separate file that queries and compiles the properties from each of these files and builds reports from the back of it. As the data I need is saved under custom properties, this come out as a large chunk of text that I then apply delimiters and pivots to in order to strip out into the consistent columns of data. All this works perfectly every day :-)

    The issue comes when handling columns with dates. These columns usually contain dates (dd/mm/yyyy) but they also contain some text responses which will vary depending on the circumstances.

    As it stands, I currently output the column as text (shown on the attachment as Current output) which preserves the whole dataset (both dates and text responses), but this means that the date dropdown filter on the output doesn't group dates by month/year etc. This inability to quickly and reliably filter by date is now causing a lot of problems.

    I could simply exclude any non date values (shown on the attachment as Alternative output) but I lose sight of the various text reponses.

    Alternatively I could use a simple If statement in the workbook (shown on the attachment as Alternative formula driven output). This however causes problems because the number of rows changes every day, some of the reporting is done as connection only so doesn't utilise any workbook, and now my data contains formulas rather than values which may cause problems further down the line. I really want to keep this all within PQ because it is so much more reliable and stable, especially when I need to make changes in the future.

    I understand that a text value is a date column is a contradiction in terms, but does anyone know of a way I can run this entirely through PQ??
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: Power Query error handling in date column

    Administrative Note:

    Unfortunately, this is a duplicate thread, and you are allowed only ONE thread per issue here.

    Please see Forum Rule #5 about thread duplication.

    I am closing this thread, but you may continue here in the original thread: https://www.excelforum.com/excel-pro...te-column.html
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Power Query error handling in date column
    By DystopiaRelic in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-16-2022, 04:07 PM
  2. [SOLVED] Power Query Unpivot Workbook Tables with Date Column Headings
    By MarvinP in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-16-2021, 10:52 AM
  3. Power Query conditional column on date
    By aldenes in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-28-2020, 11:38 PM
  4. 24 time conversion on custom column under Power Query - getting error
    By cph020283 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-22-2020, 02:20 AM
  5. VBA Error handling for "Send a frown" [Power Pivot/Power BI]
    By Kayees in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-11-2018, 03:25 PM
  6. Replies: 4
    Last Post: 04-26-2018, 11:35 AM
  7. [SOLVED] Insert a date value as a Custom Column in Power Query
    By heytherejem in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 03-28-2018, 12:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1