sandy666
07-11-2023, 03:49 PM
PRODUCT CODE
PRODUCT NAME
SALES
SALES RANK %PRODUCT NAMESALES RANK %
UNITED KINGDOMUNITED KINGDOM
25
AAAPRODUCT AAA
100
99UNITED STATES
76
BBBPRODUCT BBB
200
75SPAIN
17
CCCPRODUCT CCC
300
43JAPAN
121
Count
25
UNITED STATES
DDDPRODUCT DDD
400
82
EEEPRODUCT EEE
500
67
Count
76
SPAIN
FFFPRODUCT FFF
600
73
GGGPRODUCT GGG
700
35
HHHPRODUCT HHH
800
26
Count
17
JAPAN
IIIPRODUCT III
900
92
JJJPRODUCT JJJ
1000
53
KKKPRODUCT KKK
1100
39
LLLPRODUCT LLL
1200
5
Count
121
// Table1
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Filtered Rows" = Table.SelectRows(Source, each ([PRODUCT NAME] = "Count" or [PRODUCT NAME] = "JAPAN" or [PRODUCT NAME] = "SPAIN" or [PRODUCT NAME] = "UNITED KINGDOM" or [PRODUCT NAME] = "UNITED STATES")),
#"Filled Up" = Table.FillUp(#"Filtered Rows",{"SALES RANK %"}),
#"Filtered Rows1" = Table.SelectRows(#"Filled Up", each ([PRODUCT NAME] <> "Count")),
#"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows1",{"PRODUCT NAME", "SALES RANK %"})
in
#"Removed Other Columns"
PRODUCT NAME
SALES
SALES RANK %PRODUCT NAMESALES RANK %
UNITED KINGDOMUNITED KINGDOM
25
AAAPRODUCT AAA
100
99UNITED STATES
76
BBBPRODUCT BBB
200
75SPAIN
17
CCCPRODUCT CCC
300
43JAPAN
121
Count
25
UNITED STATES
DDDPRODUCT DDD
400
82
EEEPRODUCT EEE
500
67
Count
76
SPAIN
FFFPRODUCT FFF
600
73
GGGPRODUCT GGG
700
35
HHHPRODUCT HHH
800
26
Count
17
JAPAN
IIIPRODUCT III
900
92
JJJPRODUCT JJJ
1000
53
KKKPRODUCT KKK
1100
39
LLLPRODUCT LLL
1200
5
Count
121
// Table1
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Filtered Rows" = Table.SelectRows(Source, each ([PRODUCT NAME] = "Count" or [PRODUCT NAME] = "JAPAN" or [PRODUCT NAME] = "SPAIN" or [PRODUCT NAME] = "UNITED KINGDOM" or [PRODUCT NAME] = "UNITED STATES")),
#"Filled Up" = Table.FillUp(#"Filtered Rows",{"SALES RANK %"}),
#"Filtered Rows1" = Table.SelectRows(#"Filled Up", each ([PRODUCT NAME] <> "Count")),
#"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows1",{"PRODUCT NAME", "SALES RANK %"})
in
#"Removed Other Columns"