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.
Hello,
How can I import from assets a file called file.geojson into visual.ts? I currently have the value stored in visual.ts itself.
I am having a hard time finding the answer online.
With kind regards,
AnViL
Solved! Go to Solution.
Hi @AnViL999,
Add "resolveJsonModule": true to your tsconfig.json file's compilerOptions.
You can then import a JSON file into your code as a variable.
I use this in pretty much all visuals I write, and some examples can be seen in Deneb [tsconfig | usage in a file, with link to import lines].
Good luck!
Daniel
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Hi @AnViL999,
Add "resolveJsonModule": true to your tsconfig.json file's compilerOptions.
You can then import a JSON file into your code as a variable.
I use this in pretty much all visuals I write, and some examples can be seen in Deneb [tsconfig | usage in a file, with link to import lines].
Good luck!
Daniel
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.