Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have built a custom visuals that becomes unresponsive as soon as I add a custom expression in the "Title". If the title is hard coded e.g. if I write "abc" in the title, it works fine. However, if I use the new feature, conditional-format-visual-titles it stops working.
Duing some digging I found the following which I can't get my head around:
If I define my data roles as
"dataRoles": [ { "displayName": "Values", "name": "values", "kind": "Measure" } ]
"dataRoles": [ { "displayName": "Values", "name": "measure", "kind": "Measure" } ]
Solved! Go to Solution.
Hi @Nishantjain,
I've just tested this real quick in a test visual I had created recently and it seems to work fine.
I think that your issue might be unrelated to the condtional title, and is more to do with the dataRole but without more code, it's hard to confirm.
If you rename the dataRole, you'll also need to update any code you've written to process the dataView to use the revised name too, otherwise your code will crash out and the visual will stop rendering, unless you add some error handling around it.
Are you able to share the part of your code that processes the dataView? We can probably solve it pretty quickly if so.
Thanks,
Daniel
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Hi @Nishantjain,
I've just tested this real quick in a test visual I had created recently and it seems to work fine.
I think that your issue might be unrelated to the condtional title, and is more to do with the dataRole but without more code, it's hard to confirm.
If you rename the dataRole, you'll also need to update any code you've written to process the dataView to use the revised name too, otherwise your code will crash out and the visual will stop rendering, unless you add some error handling around it.
Are you able to share the part of your code that processes the dataView? We can probably solve it pretty quickly if so.
Thanks,
Daniel
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Thanks Daniel for your reply. I was able to figure out the issue was with my "DataView" mapping. The didn't had all my fields mapped in DataView. The visual is now working as expected.
However, the frustrating thing is that the unexpected behaviour was quite difficult to debug. I can't understand why it will be a problem only for "expression based" title.
I guess this isn't an issue that a lot of peoeple have faced.
Thanks again for your help
Nishant
Glad you're rocking 🙂
JS/TS can typically be tricky to debug, particularly if it's all running client-side and I've gotten into the habit of writing to the console throughout the lifecycle of my visual so that I can understand exactly where things go wrong, if they do. I disable this for release versions of my visuals, but it's invaluable when developing.
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
8 | |
7 | |
2 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
4 |