Forum Discussion

Andyb431's avatar
Andyb431
Frequent Visitor
5 years ago
Solved

Extracting Values From a List & Inserting in Table at Specific Rows

Hi,   Link to File: Excel File    I am trying to create a combined table from 2 source tables (Base_AnalysisTimeline and Benefits_Calc). I want to take the list of dates from the Base_AnalysisTim...
  • Jimmy801's avatar
    5 years ago

    Hello Andyb431 

     

    try this approach. Use your BenefitGUID-table and add a new column where you inserting you Timeline-table on every row. After that you expand the table

     

    let
        Base_AnalysisTimeline=
        let
            Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlSK1YlWMgKTxmDSBEyagkkzMGkOJi2UYmMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Count = _t]),
            #"Changed Type" = Table.TransformColumnTypes(Source,{{"Count", Int64.Type}})
        in
            #"Changed Type",
        
        BenefitGUID = #table({"Benefit GUID"}, {{"U1B1"}, {"U1B2"}, {"U1B3"}}),
    
        Multiply = Table.AddColumn
        (
            BenefitGUID,
            "BaseAnalysisTimeLine",
            each Base_AnalysisTimeline
        ),
        Expand = Table.ExpandTableColumn(Multiply, "BaseAnalysisTimeLine", {"Count"}, {"Count"})
    in  
        Expand

     

    Copy paste this code to the advanced editor in a new blank query to see how the solution works.

    If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
    Kudoes are nice too

    Have fun

    Jimmy