Forum Discussion
Report name
- 2 months ago
Hi Peter_23
There isn't a native DAX function like REPORTNAME() that can dynamically read the tab or report name, but you can achieve this behavior using a couple of workarounds depending on how you structure your file.
If "Report A" and "Report B" are separate pages inside the same PBIX file, the easiest trick is to use page-level filters or a disconnected navigation table. You can create a small disconnected table containing your page names, use that table to build a custom navigation menu or slicer, and then use SELECTEDVALUE() in your measure.
Alternatively, you can hardcode a specific measure on each individual page to identify it, or use the Page Name option found in the standard page navigator visual conditional formatting settings to dynamically capture where the user is looking.
If "Report A" and "Report B" are completely separate report files published to the Power BI Service that share the same semantic model, you can use the USERPRINCIPALNAME() or CUSTOMDATA() functions to pass environmental context, but the most robust method for separate reports is to simply use a localized table or parameter in each specific PBIX file before publishing.
Hi Peter_23
There isn't a native DAX function like REPORTNAME() that can dynamically read the tab or report name, but you can achieve this behavior using a couple of workarounds depending on how you structure your file.
If "Report A" and "Report B" are separate pages inside the same PBIX file, the easiest trick is to use page-level filters or a disconnected navigation table. You can create a small disconnected table containing your page names, use that table to build a custom navigation menu or slicer, and then use SELECTEDVALUE() in your measure.
Alternatively, you can hardcode a specific measure on each individual page to identify it, or use the Page Name option found in the standard page navigator visual conditional formatting settings to dynamically capture where the user is looking.
If "Report A" and "Report B" are completely separate report files published to the Power BI Service that share the same semantic model, you can use the USERPRINCIPALNAME() or CUSTOMDATA() functions to pass environmental context, but the most robust method for separate reports is to simply use a localized table or parameter in each specific PBIX file before publishing.