Power Query Changed Table

arash870

New Member
Joined
Jan 5, 2020
Messages
5
Office Version
  1. 2019
Platform
  1. Windows
How to make the yellow and red colored houses on the surface in the Power Query as a column I manually set. Without breaking the table - thank you
Book1
ABCDEFGHIJ
1Amount of inventoryNumber of inventoryselling pricesales-numbername branchcodrownamecod
2lozaten tab56511001product
3167,736,00012050office center11lozaten tab56511001
43,619,200261,281,343,8008074tehran102lozaten tab56511001
56,820,80049178,696,2001126qazvin143lozaten tab56511001
66,820,80049109,661,700691qom164lozaten tab56511001
717,817,60012843,959,900277kerman185lozaten tab56511001
81,252,8009223,925,7001411mazandaran206lozaten tab56511001
9081,571,800514oromye227lozaten tab56511001
100151,558,500955khorasan248lozaten tab56511001
11556,8004104,107,200656kermanshah269lozaten tab56511001
125,011,2003633,168,300209yazd2810lozaten tab56511001
130184,092,0001160isfehan3011lozaten tab56511001
14696,0005130,134,000820qilan3412lozaten tab56511001
1512,528,00090127,753,500805tabriz3613lozaten tab56511001
162,784,0002031,740,000200kord4014lozaten tab56511001
177,238,40052158,382,600998khozestan4215lozaten tab56511001
185,568,0004057,132,000360hamedan4416lozaten tab56511001
19058,877,700371ardebil4617lozaten tab56511001
20238,449,60017132,956,104,9001862756511001 جمع کالای lozaten tab56511001
21captppril56511004:کالاlozaten tab56511001
22115,900,20016510office center11captppril56511004
239,196,20013167,920,000849tehran102captppril56511004
247,020,0001001,600,00020qazvin143captppril56511004
257,722,0001108,800,000110qom164captppril56511004
266,318,000901,600,00020kerman185captppril56511004
2713,408,2001911,520,00019mazandaran206captppril56511004
28702,000108,000,000100oromye227captppril56511004
2909,600,000120kermanshah268captppril56511004
303,159,000450yazd289captppril56511004
3110,389,600148160,0002isfehan3010captppril56511004
3210,530,0001500qilan3411captppril56511004
3311,583,0001651,200,00015tabriz3612captppril56511004
Sheet2
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
if table A1-H33 is a Query Table it is not proper table because you have mixed data type in the same column
if you want additional two columns use Conditional Columns and Fill Down
I don't know what is Source, what is Query Table what is expected result
 
Upvote 0
Yes - it's my final table - and there is an empty row between the rows of the table
 
Upvote 0
I am not sure but you can try
Code:
// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Amount of inventory", type any}, {"Number of inventory", Int64.Type}, {"selling price", Int64.Type}, {"sales-number", Int64.Type}, {"name branch", type text}, {"cod", Int64.Type}, {"Column1", type any}, {"row", Int64.Type}}),
    #"Added Conditional Column" = Table.AddColumn(#"Changed Type", "Custom", each if [Amount of inventory] = "lozaten tab" then [Amount of inventory] else if [Amount of inventory] = "captppril" then [Amount of inventory] else null),
    #"Filled Down" = Table.FillDown(#"Added Conditional Column",{"Custom"}),
    #"Duplicated Column" = Table.DuplicateColumn(#"Filled Down", "cod", "cod - Copy"),
    #"Filled Down1" = Table.FillDown(#"Duplicated Column",{"cod - Copy"})
in
    #"Filled Down1"

qt.jpg
 
Upvote 0
فا
I am not sure but you can try
Code:
// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Amount of inventory", type any}, {"Number of inventory", Int64.Type}, {"selling price", Int64.Type}, {"sales-number", Int64.Type}, {"name branch", type text}, {"cod", Int64.Type}, {"Column1", type any}, {"row", Int64.Type}}),
    #"Added Conditional Column" = Table.AddColumn(#"Changed Type", "Custom", each if [Amount of inventory] = "lozaten tab" then [Amount of inventory] else if [Amount of inventory] = "captppril" then [Amount of inventory] else null),
    #"Filled Down" = Table.FillDown(#"Added Conditional Column",{"Custom"}),
    #"Duplicated Column" = Table.DuplicateColumn(#"Filled Down", "cod", "cod - Copy"),
    #"Filled Down1" = Table.FillDown(#"Duplicated Column",{"cod - Copy"})
in
    #"Filled Down1"

View attachment 3245
thank you
 
Upvote 0

Forum statistics

Threads
1,226,125
Messages
6,189,137
Members
453,525
Latest member
compugor

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top