46、Power Query-Table.FillDown函数简介

本节跟大家分享一个经验,函数Table.FillDown的使用。

格式:

Table.FillDown(table as table, columns as list) as table

Returns a table from the table specified where the value of a previous cell is propagated to the null-valued cells below in the columnsspecified.

例子:

Return a table with the null values in column [Place] filled with the value above them from the table.

Table.FillDown(Table.FromRecords({[Place=1, Name="Bob"], [Place=null, Name="John"], [Place=2, Name="Brad"], [Place=3, Name="Mark"], [Place=null, Name="Tom"], [Place=null, Name="Adam"]}), {"Place"})


下面我们看一个例子,比如学生成绩大于等于60的显示合格,否则显示空(用条件列判断)。


此时使用向下填充没有问题。


若更改条件公式。

Table.AddColumn(更改的类型, "Custom", each if [成绩] >= 60 then "合格" else null )

Table.AddColumn(更改的类型, "Custom", each if [成绩] >= 60 then "合格" else "")


这个时候再向下填充是不起作用的。


满足FillDown的条件是要填充的单元格必须是null值,不是""。

例子没有任何意义,仅作说明,勿要见怪。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

SAP剑客

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值