Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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?
Solved! Go to Solution.
I was able to make it work when I change my measure's Data type to Text on Measure tools
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 =
I was able to make it work when I change my measure's Data type to Text on Measure tools
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
User | Count |
---|---|
77 | |
74 | |
42 | |
32 | |
28 |
User | Count |
---|---|
100 | |
93 | |
52 | |
50 | |
48 |