This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
I want to show version or displayName from pbiviz.json in my visual.
In small print just to make it easy for knowing which reports need new versions of my visual.
I can not find a method to access these values. Is there a way to do that?
Solved! Go to Solution.
Hi @Anonymous,
Add "resolveJsonModule": true to the compilerOptions in your tsconfig.json [documentation].
Add an import in the desired .ts file for your pbiviz.json. Assuming that you're using src/visual.ts, this would look something like the following:
import * as pbiviz from '../pbiviz.json';
You can now access the JSON from pbiviz.json as if it were an object, e.g.:
pbiviz.visual.displayName;
I'm using this in Deneb for a similar reason. You can see where I'm doing this here if you need it for reference.
Regards,
Daniel
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Hi @Anonymous,
Add "resolveJsonModule": true to the compilerOptions in your tsconfig.json [documentation].
Add an import in the desired .ts file for your pbiviz.json. Assuming that you're using src/visual.ts, this would look something like the following:
import * as pbiviz from '../pbiviz.json';
You can now access the JSON from pbiviz.json as if it were an object, e.g.:
pbiviz.visual.displayName;
I'm using this in Deneb for a similar reason. You can see where I'm doing this here if you need it for reference.
Regards,
Daniel
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Yes! 👍
As simple as that.
Thanks a lot.
Hi @Anonymous ,
I think you can try to change the GUID in custom visual json code.
{
"visual": {
"name": "CustomVisual", // internal visual name (should not contain spaces)
"displayName": "Custom Visual!", // visual name displayed to user (used in gallery)
"guid": "PBI_CV_xxxxxxx", // a unique id for this visual MUST BE UNIQUE
"visualClassName": "Custom" // the entry class for your visual. (By default Visual: visual.ts)
"version": "1.0.0", // visual version. Should be semantic version (increment if you update the visual)
"description": "", // description used in gallery
"supportUrl": "", // url to where users can get support for this visual
"gitHubUrl": "" // url to the source in github (if applicable)
},
Here is a solved post with similar issue like yours. I hope it could help you solve your issue.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I have no idea how this should help solve my problem.
In my visual to access the metadata (contained in the pbiviz.json) and then display that in a label in the visual.
something like
var version = this.metadata.visual.version;This is not the correct syntax, but I can not find any info whether this is possible or how to do it.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |