[英]choose all except fixed columns Power Query (Excel)
Lets say that I have a table in Power Query where the number of columns is not fixed (it varies depending on the data that I get from database). 可以说我在Power Query中有一个表,其中的列数不是固定的(它取决于我从数据库中获得的数据)。
The issue is that I want to fill down values later on, for which I have a code like 问题是我想稍后填充值,为此我有类似的代码
Table.FillDown(#"Razvrščene vrstice",{"Column2", "Column3", "Column4", "Column5", "Column6", "Column7", "Column8", "Column9", "Column10"}) Table.FillDown(#“Razvrščenevrstice”,{“ Column2”,“ Column3”,“ Column4”,“ Column5”,“ Column6”,“ Column7”,“ Column8”,“ Column9”,“ Column10”})
Of course when I get lets say one column less, the whole thing crashes ('Cannot find column Column10')... 当然,当我少说一列时,整个事情崩溃了(“找不到列Column10”)...
Is there any way around this? 有没有办法解决? For example: 'choose all but the first two columns and fill them down'?
例如:“选择除前两列以外的所有内容并填写下来”?
Thanks, Matija 谢谢,Matija
Does this help? 这有帮助吗?
If I start with this table, named Table1: 如果我从名为Table1的表开始:
And I use the following query: 我使用以下查询:
let
Source = Table1,
#"Filled Down" = Table.FillDown(Source,List.RemoveMatchingItems(Table.ColumnNames(Source),{"Column1", "Column2"}))
in
#"Filled Down"
I get this: 我得到这个:
The {"Column1", "Column2"}
are the names of the columns to be skipped during the filldown. {"Column1", "Column2"}
是在填充期间要跳过的列的名称。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.