Forum Discussion
Analitika
5 years agoPost Prodigy
=Excel.CurrentWorkbook()
How work this function? =Excel.CurrentWorkbook() Which is current workbook? I always got emtpy fields Do i need specify any workbook name and path? Do it take everithing from Activeworkbook?
AllisonKennedy
5 years agoCommunity Champion
Analitika
You can use M code in Power Query in Excel as well as in Power BI. When you use Power Query in Excel, you can use the Excel.CurrentWorkbook function. https://support.microsoft.com/en-us/office/power-query-overview-and-learning-ed614c81-4b00-4291-bd3a-55d80767f81d
As MFelix said, here is an example of the 'Source' step when I click the 'From Table' button in the 'Data' tab in the ribbon in Excel and use an Excel table as the source for my query:
= Excel.CurrentWorkbook(){[Name="Table1"]}[Content]
This says, look for Table1 in the current workbook (same workbook as the report is being built using Power Query).
If you're using Power BI your Source step might look more like Greg_Deckler 's example.