gpt-3.5-turbo-0613· OpenAI
WildChat-4.8M (AI2)
Power BI, Transform to get the sheet name using Custom column
- User
Power BI, Transform to get the sheet name using Custom column
- Assistant
To get the sheet name using a custom column in Power BI, you can follow these steps:
- Connect to your Excel workbook or any other data source in Power BI.
- In the Power Query Editor, select the table that contains the data you want to add the custom column to.
- In the "Add Column" tab, click on "Custom Column".
- In the formula bar, enter the following formula to get the sheet name:
Excel.CurrentWorkbook(){[Name = "YourTable"]}[Content][Item= "SheetName"]. Replace "YourTable" with the name of your table. Replace "SheetName" with the name of the column you want to store the sheet name in. - Click "OK" to add the custom column.
- Close and apply the changes to load the data into Power BI.
- Now, the custom column will contain the sheet name for each row of data.
Note: This method works when importing data from an Excel workbook. If you are using a different data source, you may need to use a different method to retrieve the sheet name.