Forum Discussion
How to render Image Url using DAX
- 1 year ago
That approach will not work. If the flag URL is simply combined with the country name, the result will be an invalid image link. The flag image and the country name need to be displayed separately, or the image can be included inside a DAX-generated SVG. AI can help create these SVGs, but DAX-generated SVGs do not allow images from external URLs. To use them, the images must first be converted to Base64 format, and those Base64 strings then imported back into Power BI before creating the SVG. This way, the images are embedded directly and will display correctly without relying on external sources. Alternatively, use image URLs that already contain the country name.
- Sandip_Palit1 year agoSuper User
Hi danextian , I already did that. Maybe thats not working because I used string concatenation with the country name. I want to concat the Flag instead.
- danextian1 year agoSuper User
That approach will not work. If the flag URL is simply combined with the country name, the result will be an invalid image link. The flag image and the country name need to be displayed separately, or the image can be included inside a DAX-generated SVG. AI can help create these SVGs, but DAX-generated SVGs do not allow images from external URLs. To use them, the images must first be converted to Base64 format, and those Base64 strings then imported back into Power BI before creating the SVG. This way, the images are embedded directly and will display correctly without relying on external sources. Alternatively, use image URLs that already contain the country name.