+ Reply to Thread
Results 1 to 4 of 4

Trying to create Date Table in power query using M

  1. #1
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    610

    Trying to create Date Table in power query using M

    Hello all,
    I've been trying to create a date table in power query but am getting continual errors ;
    I've loaded a small table into power query and then used blank query ; =List.Min(Table1[Date]) to return lowest date then added step List.Max(Table1[Date]), to return hightest date; The first step is left as 'source' and the second renamed finish
    I then try to add the third step ;

    List.Dates(Source,Duration.Days(Finish-Source)+1,#Duration(1,0,0,0)), I've tried #duration(1,0,0,0)

    I've attached the file, any help or advice gratefully received.

    Richard.
    Attached Files Attached Files

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,907

    Re: Trying to create Date Table in power query using M

    Source should be: = Date.From(List.Min(Table1[Date]))
    Similarly, Finish should be: = Date.From(List.Max(Table1[Date]))
    Then your list is: = List.Dates(Source,Duration.Days(Finish-Source)+1,#duration(1,0,0,0))
    Rory

  3. #3
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    610

    Re: Trying to create Date Table in power query using M

    Thanks Rory,

    Richard.

  4. #4
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,907

    Re: Trying to create Date Table in power query using M

    Glad we could help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Create slicer for regular table in Power Query (Get Data)
    By Sgilmore in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-22-2021, 08:43 AM
  2. [SOLVED] Power Query - Create a Matrix from a Table
    By m_kerr in forum Excel General
    Replies: 18
    Last Post: 10-14-2021, 05:14 AM
  3. [SOLVED] Create a Table or 4 column based upon dataset - Power Query or Macro???? Help
    By cvici in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-29-2021, 02:24 AM
  4. How to create pivot table with multiple headers in power query
    By CherryLee in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 03-07-2021, 10:16 PM
  5. Replies: 4
    Last Post: 02-17-2020, 06:03 AM
  6. [SOLVED] Power Query - load to workbook and create query table
    By jaryszek in forum Excel General
    Replies: 1
    Last Post: 12-10-2019, 11:09 AM
  7. Replies: 1
    Last Post: 11-12-2018, 02:46 PM

Tags for this Thread

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