Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
pharvey7
Frequent Visitor

Using the Page Name in a new measure

I've incorporated an idea from an earlier post, where a field can be used interactively in a title (e.g. = "Graph for " & IF(HASONEVALUE('table1'[column1]),VALUES('table1'[column1]),"<Text>").

 

I would like to go a step further and use the page name, so that I can use the same measure across other pages. So if I renamed the page to "Graph", I could replace the above example with = 'Graph ' & "for " & IF(HASONEVALUE('table1'[column1]),VALUES('table1'[column1]),"<Text>").

 

So if I had another page with a table of data, it would read: = 'Table ' & "for " & IF(HASONEVALUE('table1'[column1]),VALUES('table1'[column1]),"<Text>").

 

My question therefore, is how can I use the page name in this example?

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @pharvey7,

 

Based on my test, it is not possible to meet your requirement currently. You can come up a new idea about that and add your comments there to improve Power BI and make this feature coming sooner.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

4 REPLIES 4
andrewbrick
Advocate III
Advocate III

You could create a table with column names corresponding to each page and one row of dummy values of "1" for each column.  Then, on each page, create a page-level filter to filter the corresponding column in that table (basic filtering, select "1" from the list of values).  Then, in your measure, use IF(ISFILTERED(PageNames[PageName1]),"Page Name 1", IF(ISFILTERED(PageNames[PageName2],"Page Name 2",...)).  The ISFILTERED function will return true/false (and therefore the active page name you type in) based on the page you're on, in turn based on the page-level filters you've set on each page.

This solution won't respond to changes made to the page names on the tabs along the bottom.  You'd have to change the text returned by the IF(ISFILTERED()) bit to correspond to page name changes.

This assumes the user wouldn't change the page level filters (which they could easily do). 

Unless you hide this particular page-level filter...

v-frfei-msft
Community Support
Community Support

Hi @pharvey7,

 

Based on my test, it is not possible to meet your requirement currently. You can come up a new idea about that and add your comments there to improve Power BI and make this feature coming sooner.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.