Sadredin Mahmoudi
Sadredin Mahmoudi

Reputation: 1

Combining a title measure to also show an image next to the string in Powerbi?

I have a custom tooltip for my PowerBi map, which shows when you hover over a specific sourcing area on the map.

Currently, the top card has the following measure

_MAPTITLE = SELECTEDVALUE('Volumes'[Sourcing Area]) 

and I have this measure to display flags,

SelectedFlagURL = 

 SELECTEDVALUE('Flags'[Web URL])

The measure,

SelectedFlagURL = 

 SELECTEDVALUE('Flags'[Web URL])

Is set as "Image URL", while

_MAPTITLE = SELECTEDVALUE('Volumes'[Sourcing Area]) 

is uncategorized.

I want to combine it so that the sourcing area name is shown and the flag of the country is next to it. For example the output should be,

( [ARGENTINA] [FLAG OF ARGENTINA] )

I tried to put them together as such,

_MAPTITLE = SELECTEDVALUE('Volumes'[Sourcing Area]) & SELECTEDVALUE('Flags'[Web URL])

But the output becomes shows the link of the image instead. What is required to achieve my desired result?

Upvotes: 0

Views: 45

Answers (1)

Michal
Michal

Reputation: 6099

You can't directly concatenate text and an image URL in a single measure, you can use a workaround by displaying them in separate visuals on the tooltip page.

Create a new page and set its size to Tooltip in the Page Information settings. Design this page to include the visuals you want to display in the tooltip.

On the tooltip page, add a card visual and set its value to _MAPTITLE and add an image visual and set its image URL to SelectedFlagURL.

Upvotes: 1

Related Questions