Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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 |
---|---|
84 | |
76 | |
74 | |
48 | |
39 |
User | Count |
---|---|
114 | |
56 | |
51 | |
42 | |
42 |