Results 1 to 4 of 4

Thread: how to rebuild periods (with non-contiguous Periods and with overlaps)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Seeker ivan00's Avatar
    Join Date
    Mar 2017
    Location
    Genova (Italia)
    Posts
    6
    Articles
    0
    Excel Version
    Office 2013

    Question how to rebuild periods (with non-contiguous Periods and with overlaps)

    Hello,
    I would ask help because I can not understand how to solve a problem related to a table that manages periods of different dates (also non contiguous and overlap). I would like to rebuild these periods (or to expand these lines), using existing dates, even when the attribute shown is the same.
    I tried to help me with adding two index (from 0 and from 1) but I can not understand the logic to apply.
    Can you please help me?

    Here below an example that can better explain my problem.
    Click image for larger version. 

Name:	Scenario1.PNG 
Views:	33 
Size:	46.3 KB 
ID:	10491
    Thanks again for the support
    Ivan

  2. #2
    Conjurer pinarello's Avatar
    Join Date
    Jun 2019
    Location
    Germany
    Posts
    138
    Articles
    0
    Excel Version
    Office 365
    Hello,

    Firstly, I have not yet realized what the desired result should look like and secondly, I have tried to import your image into a Power Query to possibly be able to create the desired result.

    But unfortunately my O365 Power Query is not able to import images.

    Okay, I think I understand the task now, but images still cannot be imported by my Power Query.
    Last edited by pinarello; 2021-05-08 at 10:09 AM.

  3. #3
    Seeker ivan00's Avatar
    Join Date
    Mar 2017
    Location
    Genova (Italia)
    Posts
    6
    Articles
    0
    Excel Version
    Office 2013
    Hi,
    I try to paste table below, thanks.
    Code:
    let 
      Source = Table.FromRecords(
        {  
    
    [Name="John", StartDate="16/04/2014", EndDate="31/08/2023", Attribute="B"],
    [Name="John", StartDate="01/05/2021", EndDate="31/12/9999", Attribute="A"],
    [Name="John", StartDate="01/01/2022", EndDate="31/07/2024", Attribute="A"],
    [Name="Peter", StartDate="17/04/2014", EndDate="31/07/2021", Attribute="A"],
    [Name="Peter", StartDate="01/01/2022", EndDate="31/08/2023", Attribute="A"]
    
        }
      ),
        #"Modificato tipo" = Table.TransformColumnTypes(Source,{{"StartDate", type date}, {"EndDate", type date}, {"Name", type text}, {"Attribute", type text}})
    in
      #"Modificato tipo"

  4. #4
    Conjurer pinarello's Avatar
    Join Date
    Jun 2019
    Location
    Germany
    Posts
    138
    Articles
    0
    Excel Version
    Office 365
    Now that I've done some work on the problem, I find that I can't derive the transformation rules (3 input lines John to 12 output lines) after all.

    You seem to assume that this is clear as daylight for everyone. In this respect it can be due to me that I do not understand it.

    So I hope for you that someone else can derive the logic correctly and is able to create the desired Power Query for you.

Tags for this Thread

Posting Permissions

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