Dec 27 2019 10:24 PM
Hi Every one
Happy Chrismas and New Year in Advance
How to expand the table (Table A) based on no of sold and item. It should be shown in the same sequence in one column (Table B) itself?
Dec 27 2019 10:51 PM
Dec 27 2019 11:21 PM
Hi,
Actually I want to list out unit price in the number mentioned in the no of sold.
For Eg:
Glassi Sold 8 Times. So i want to list out glassi price 8 times in the same column.
Dec 27 2019 11:36 PM
Just to be clear: List.Numbers is a function within Power Query.
So you have to load the table into Power Query and add a custom column with containing this function.
See attached file.
Dec 28 2019 04:02 AM
Jan 07 2020 05:36 AM
Does any one have any solution for this?
Jan 07 2020 07:09 AM
What @Detlef Lewin suggested is to query source table by Power Query and made small transformation, generated script is looks like
let
Source = Excel.CurrentWorkbook(){[Name="TableA"]}[Content],
AddNo = Table.AddColumn(
Source,
"No",
each List.Numbers(1,[NoOfTimes Sold])
),
ExpandNo = Table.ExpandListColumn(
AddNo, "No"
),
RemoveUnused = Table.SelectColumns(
ExpandNo,
{"Item", "No", "Unit price"}
)
in
RemoveUnused
and load result back into Excel sheet. It is in attached file.