แทนที่ค่าใน List
=List.ReplaceValue(list as list, oldValue as any, newValue as any, replacer as function) as list
=List.ReplaceValue(list as list, oldValue as any, newValue as any, replacer as function) as list
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
| list | list | Yes | List ต้นฉบับ | |
| oldValue | any | Yes | ค่าเดิม | |
| newValue | any | Yes | ค่าใหม่ | |
| replacer | function | Yes | ฟังก์ชันแทนที่ (Replacer.ReplaceValue) |
List.ReplaceValue({1, 2, 3}, 2, 5, Replacer.ReplaceValue)=List.ReplaceValue({1, 2, 3}, 2, 5, Replacer.ReplaceValue)
{1, 5, 3}
ฟังก์ชัน List.ReplaceValue ใน Power Query ใช้สำหรับแทนที่ค่าใน List