SOLVED

Having trouble transposing a table

%3CLINGO-SUB%20id%3D%22lingo-sub-1928222%22%20slang%3D%22en-US%22%3EHaving%20trouble%20transposing%20a%20table%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1928222%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20do%20the%20following%20transpose%2C%20everything%20I%20have%20try%20so%20far%20failed.%20This%20is%20a%20sample%20the%20original%20table%20is%20a%20lot%20bigger.%20I%20need%20it%20in%20power%20query%2C%20thanks.%3C%2FP%3E%3CTABLE%20width%3D%22986%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%2268%22%3EWeek%3C%2FTD%3E%3CTD%20width%3D%2264%22%3ETrue%20False%3C%2FTD%3E%3CTD%20width%3D%2264%22%3ECount%3C%2FTD%3E%3CTD%20width%3D%2264%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%2264%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%2264%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%2268%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%2268%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%2268%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%2261%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%2268%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%2268%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%2268%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%2268%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%2261%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E4%2F12%2F2020%3C%2FTD%3E%3CTD%3E-%3C%2FTD%3E%3CTD%3E27%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%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-1928349%22%20slang%3D%22en-US%22%3ERe%3A%20Having%20trouble%20transposing%20a%20table%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1928349%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F438859%22%20target%3D%22_blank%22%3E%40Ocasio27%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIt's%20not%20clear%20what%20shall%20be%20the%20logic%20of%20how%20to%20group%20data%20if%20one%20value%20from%20the%20pair%20is%20missed.%20For%20example%2C%20here%20is%20only%20minus%20for%20the%20week%20from%20May%2003%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20259px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F235808iB923CEF17C9723CF%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EIn%20the%20sample%20you%20group%20it%20with%20the%20value%20from%20next%20week%2C%20again%20not%20clear%20why%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20842px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F235809i9B614490F0955687%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EIf%20ignore%20that%20the%20grouping%20could%20be%20done%20as%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powerquery%22%3E%3CCODE%3Elet%0A%20%20%20%20Source%20%3D%20Excel.CurrentWorkbook()%7B%5BName%3D%22Table1%22%5D%7D%5BContent%5D%2C%0A%20%20%20%20%23%22Changed%20Type%22%20%3D%20Table.TransformColumnTypes(%0A%20%20%20%20%20%20%20%20Source%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%22Week%22%2C%20type%20date%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%22True%20False%22%2C%20type%20text%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%22Count%22%2C%20Int64.Type%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20)%2C%0A%20%20%20%20ListOfWeeks%20%3D%0A%20%20%20%20%20%20%20%20List.Transform(%0A%20%20%20%20%20%20%20%20%20%20%20%20List.Distinct(%23%22Changed%20Type%22%5BWeek%5D)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20each%20Text.From(_)%0A%20%20%20%20%20%20%20%20)%2C%0A%20%20%20%20%23%22Grouped%20Rows%22%20%3D%20Table.Group(%0A%20%20%20%20%20%20%20%20%23%22Changed%20Type%22%2C%7B%22True%20False%22%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%22Count%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20each%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Table.PromoteHeaders(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Table.Transpose(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Table.RemoveColumns(_%2C%7B%22True%20False%22%7D)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20)%2C%20%5BPromoteAllScalars%3Dtrue%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20)%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20)%2C%0A%20%20%20%20%23%22Expanded%20Count%22%20%3D%20Table.ExpandTableColumn(%0A%20%20%20%20%20%20%20%20%23%22Grouped%20Rows%22%2C%0A%20%20%20%20%20%20%20%20%22Count%22%2C%0A%20%20%20%20%20%20%20%20ListOfWeeks%2C%20ListOfWeeks%0A%20%20%20%20)%0Ain%0A%20%20%20%20%23%22Expanded%20Count%22%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Frequent Contributor

I am trying to do the following transpose, everything I have try so far failed. This is a sample the original table is a lot bigger. I need it in power query, thanks.

WeekTrue FalseCount            
4/12/2020-27   4/12/20204/19/20204/26/20205/3/20205/10/20205/17/20205/24/20205/31/20206/7/2020
4/12/2020+4  -271001381165169901521
4/19/2020+1  +4110115 222249
4/19/2020-100            
4/26/2020+10            
4/26/2020-138            
5/3/2020-116            
5/10/2020-115            
5/10/2020+5            
5/17/2020+2            
5/17/2020-169            
5/24/2020+2            
5/24/2020-90            
5/31/2020+2            
5/31/2020-152            
6/7/2020-249            
6/7/2020+1            
1 Reply
Best Response confirmed by Ocasio27 (Frequent Contributor)
Solution

@Ocasio27 

It's not clear what shall be the logic of how to group data if one value from the pair is missed. For example, here is only minus for the week from May 03

image.png

In the sample you group it with the value from next week, again not clear why

image.png

If ignore that the grouping could be done as

let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(
        Source,
        {
            {"Week", type date},
            {"True False", type text},
            {"Count", Int64.Type}
        }
    ),
    ListOfWeeks =
        List.Transform(
            List.Distinct(#"Changed Type"[Week]),
            each Text.From(_)
        ),
    #"Grouped Rows" = Table.Group(
        #"Changed Type",{"True False"},
        {
            {"Count",
                each
                    Table.PromoteHeaders(
                        Table.Transpose(
                            Table.RemoveColumns(_,{"True False"})
                        ), [PromoteAllScalars=true]
                    )
            }
        }
    ),
    #"Expanded Count" = Table.ExpandTableColumn(
        #"Grouped Rows",
        "Count",
        ListOfWeeks, ListOfWeeks
    )
in
    #"Expanded Count"