Forum Discussion
Create a date Variable in excel and get power query to repeat that date over all rows in a table
- Anonymous2 years ago
Hi Jimbo1980 ,
After I reviewed again, I understand that you want call a column from another table.
Try adding a custom column. #"tablename"[columnname].
#"Table (2)"[ReportDate][RpoertDate] is in Table(2).
Expand it.
You can see the [ReportDate] from Table(2) now is in Table.
Similar post:Solved: How to reference another table in Query Editor (M) - Microsoft Fabric Community
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Jimbo1980 ,
Thanks for reaching out to the community.
To get the current date in Power Query, you can use the expression “= DateTime.Date (DateTime.LocalNow ())” in the Formula Bar. This generates the current datetime value in Power Query by using the DateTime.LocalNow function, which looks at the current date and time on your system.
DateTime.LocalNow - PowerQuery M | Microsoft Learn
How to Create Today's Date in Power Query M (gorilla.bi)
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Jimbo19802 years agoRegular Visitor
Hi Stephen,
Thank you for your reply but unfortunately the current date isn't what I am looking for. I need to create a variable which I can type the report date in (This could be a date in the past). Then I can use this variable or object to refer to in my table of 6,000 rows to perform the necessary calculations.
- Anonymous2 years agoNot applicable
Hi Jimbo1980 ,
After I reviewed again, I understand that you want call a column from another table.
Try adding a custom column. #"tablename"[columnname].
#"Table (2)"[ReportDate][RpoertDate] is in Table(2).
Expand it.
You can see the [ReportDate] from Table(2) now is in Table.
Similar post:Solved: How to reference another table in Query Editor (M) - Microsoft Fabric Community
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Jimbo19802 years agoRegular Visitor
Thanks for that Stephen that worked!