• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Multiple Vlookup Formula

dsubash

New Member
Dear All,

I have an excel database with the following details:

Column A - Names of the City (Delhi, Mumbai, Chennai, etc)
Column B - Month & Year ( 6 months data - Apr 24 to Sep 24)
Column C - Name of the Products (Computer, Printer, Barcode reader, etc)
Column D - No. of Units Sold

Attached is the sample database and the report format.

I am looking for a formula to arrive at the report format as per the attachment.

Thanks in advance.
Subash D
 

Attachments

  • Sample.xlsx
    11.4 KB · Views: 6
See if this works for you with Power Query

Code:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Mon & Yr", type date}}),
    #"Merged Columns" = Table.CombineColumns(Table.TransformColumnTypes(#"Changed Type", {{"Mon & Yr", type text}}, "en-US"),{"City", "Mon & Yr"},Combiner.CombineTextByDelimiter(":", QuoteStyle.None),"City:Date"),
    #"Pivoted Column" = Table.Pivot(#"Merged Columns", List.Distinct(#"Merged Columns"[#"City:Date"]), "City:Date", "No. of Units Sold")
in
    #"Pivoted Column"
 

Attachments

  • Sample.xlsx
    21.9 KB · Views: 4
Back
Top