Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
I want to insert the date from row 1 into the Table on row one, the code ive used has inserted the dates as a list so they are all present. Is there a waty to get just the date from that row into the table?
Table.AddColumn(
#"Invoked Custom Function",
"Custom",
each Table.AddColumn(
[ContentAdder],
"Date",
each #"Invoked Custom Function"[Date],
type date
)
)
edit: the date comes from the file name
Solved! Go to Solution.
You need to trap that value (date) in a variable first, then reference the variable inside the Table.AddColumn. Something like this:
Table.AddColumn(
#"Invoked Custom Function",
"Custom",
each
let
varDate = [Date]
in
Table.AddColumn(
[ContentAdder],
"Date",
each varDate,
type date
)
)
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingTable.AddColumn(
#"Invoked Custom Function",
"Custom",
(x) =>
Table.AddColumn(
x[ContentAdder],
"Date",
(y) => x[Date],
type date
)
)
You need to trap that value (date) in a variable first, then reference the variable inside the Table.AddColumn. Something like this:
Table.AddColumn(
#"Invoked Custom Function",
"Custom",
each
let
varDate = [Date]
in
Table.AddColumn(
[ContentAdder],
"Date",
each varDate,
type date
)
)
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingThank you very much.
Can i ask why it needs to be trapped in a variable? or if you cold point me to some reading that would explain.
In trapping the variable the way I did, I got the value outside of the context of the next Table.AddColumn() function. You can read more about it here. M Language basic concepts - PowerQuery M | Microsoft Learn
But it is similar to using a variable in DAX to trap values at an outer context vs using EARLIER() in the inner context.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingVote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 16 | |
| 12 | |
| 9 | |
| 7 | |
| 6 |