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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Zhinee
Helper I
Helper I

How to display dynamic table title based on the row I clicked (Live Connection)

my report is using a live connection, it has a session table and a joblet table.

One session can have multiple joblets

I want to display a dynamic table title based on the row I clicked in another table (showing session id).

For example:

  • When I click on a Session row, my Joblet table will shows joblets that belong to that session

  • I want the Joblet table title to show something like: "Joblets for Session id: xxxxx"

I asked chatgpt,
It tells me to create a measure:

JobletTableTitle =

IF (

HASONEVALUE(Session[SessionID]),

"Joblets for Session: " & VALUES(Session[SessionID]),

BLANK()

)
and it tells me go to:
Joblet table visual → Format → Title → fx → Field value → I can see my measure listed, but it's greyed out and cannot be selected.

How can I make this work?

1 ACCEPTED SOLUTION

I was able to make it work when I change my measure's Data type to Text on Measure tools

Zhinee_0-1749761710866.png

 

 

View solution in original post

3 REPLIES 3
kpost
Super User
Super User

How about this:

 

JobletTableTitle =
var selected = SELECTEDVALUE(Session[SessionID])

return

IF (

HASONEVALUE(Session[SessionID]),

"Joblets for Session: " & selected ,

""

)

 

But I think we can do better.  Because what if more than one session is selected, or what if none are selected, or all of them?  (This DAX measure also assumes your SessionIDs don't have commas in them, and there are no visual or page-level filters on the SessionID field affecting the visual where this title appears)

JobletTableTitle = 

var selected_sessions = IF(
    ISFILTERED(Session[SessionID]),
    CONCATENATEX(
        VALUES(Session[SessionID]),
        Session[SessionID], ", "
    ),
    "All"
)
 
 
var session_plural = IF(CONTAINSSTRING(selected_sessions , ",") || selected_sessions = "All", "Session IDs", "Session ID")
return
"Joblets for " & session_plural & ": " & selected_sessions


///Mediocre power BI advice, but it's free///

I was able to make it work when I change my measure's Data type to Text on Measure tools

Zhinee_0-1749761710866.png

 

 

I guess my issue now is that the measure I added is greyed out when I try to use it with the fx option for the table title. Therefore, I cannot dynamically change my joblet  table title 

Zhinee_0-1749760219016.png

 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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