This tutorial explains how to get a value from cell on sheet and use it in Power Query.

Obviously, this can only be used in Excel - not in Power BI.

The M language can´t reference the cell address, like "C2", but can reference inserted table. This table can have one row with the value you need.

To have the value from cell in new column just use syntax like this:

Pokud chceme tedy hodnotu z této buňky použít např. do nového sloupce, bude zápis vlastního sloupce takto:

  • Table.Column(Excel.CurrentWorkbook(){[Name="Table1"]}[Content], "nice_column")

The red parts, name of table and name of column, should be replaced by your table and column name.

This is how the new column looks like:

Click on the double sided row and see the result:

This value can be used anywhere in Power Query - for example for source file path definition.

Leave a Reply

Your email address will not be published.


clear formPost comment