Search notes:

Power Query M formula language standard library: Table.AddColumn

Table.AddColumn(TABLE as table, NEWCOLUMNNAME as text, COLUMNGENERATOR as function, optional COLUMNTYPE as nullable type) as table
Table.AddColumn adds a new column to a table by calling COLUMNGENERATOR on each record. The returned value of COLUMNGENERATOR becomes the column's new value.
Example:
let
   tab = #table(
    { "id", "val 1", "val 2"}, {
     {  1 , "abc"  ,   1111 },
     {  2 , "def"  ,     22 },
     {  3 , "ghi"  ,    333 }
   }),
   tab_ = Table.AddColumn(tab, "size", each
      if      [val 2] > 1000 then "large"
      else if [val 2] >  100 then "medium"
      else                        "small"
   )
in
   tab_

See also

The Power Query standard library and its function Table.CombineColumns.

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Microsof...', 1758209675, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Microsoft/Power-Query/M-formula/standard-library/Table/AddColumn(55): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78