Results 1 to 5 of 5

Power Query List insert range at irregular intervals

Threaded View

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

    Power Query List insert range at irregular intervals

    Hi, I've pretty much got what I wanted , to insert a range at each change in list value, I did not want to group, and this is sort of grouping but not quite.

    My problem is the last step i end up with a blank at bottom, witch is easy to remove but I'd rather it did not occur,

      let
      Source = {"A", "A", "A", "B", "C", "B", "B", "C", "C", "C", "D", "D", "D", "A", "B", "B", "D"}, 
      alist = Source, 
      dlist = List.Distinct(alist), 
      Generate = List.Generate(() => 0, 
        each _ < List.Count(dlist), 
        each _ + 1, 
        each let x = dlist{_}   in   List.Select(alist, (A) => A = x) ), 
      Insert = List.Transform(Generate, each List.InsertRange(_, List.Count(_), {""})), 
      Combine = List.Combine(Insert)
    in
      Combine
    I have tried to list.remvoe last within this but get an error, so any suggestions for that, and if there a better way's , I would be interested.

    Richard.
    Attached Files Attached Files

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 Insert Rows at uneven intervals
    By Dicken in forum Office 365
    Replies: 5
    Last Post: 05-06-2024, 09:18 AM
  2. How can I concatenate text at irregular intervals?
    By dogplayingpoker in forum Excel General
    Replies: 3
    Last Post: 01-07-2015, 05:22 PM
  3. Calculating quantiies from irregular intervals to regular intervals
    By abhi1421 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-15-2014, 06:34 AM
  4. histogram with irregular intervals or labeling XY scatter
    By rana12345 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 05-02-2013, 06:52 AM
  5. Converting Data in Irregular Time Intervals into Regular Time Intervals
    By AlexJT in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2011, 02:42 AM
  6. Need to Transpose Irregular Time Intervals into Regular Time Intervals
    By AlexJT in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2011, 08:30 PM
  7. [SOLVED] How to display gridlines at irregular intervals?
    By Jason Weiss in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 01-03-2005, 04:06 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