I really enjoy linking data to Visio diagrams, either directly or using the Visio custom visual in Power BI. This visual has the ability to display PowerQuery data as text or color, but not as icons or data bars. These last two features are something that can be used natively in Visio, and automatically updated in Visio Online. I have previously urged Microsoft to add these abilities to the Visio custom visual in Power BI, but there is no sign of it appearing just yet. The custom visual actually removes any Data Graphics ( Text Callouts, Icon Sets, Data Bars or Color by Value) that may already exist in a Visio diagram when it is embedded into Power BI. This reduces the number of shapes in the visual (there is currently a low limit) and, in any case, the data should be displayed from Power BI.
I want to be able to display some data as icons and data bars within the Visio diagram, so what is the alternative? Fortunately, there is a way using text symbol characters and the wonderful Power Query formulas!
In this example, I had numeric data for the Fire Marshall, First Aider, and Passed columns. I used Power Query to change the Fire Marshall and First Aider columns to text, and then replaced the zeros with an empty string, and then replaced the 1 character with a suitable symbol from the Segoe UI character map ( ● and ♦ ). As far as I can tell, the Visio visual only uses the Segoe UI font for text values display, even though the title font can be changed. Then I added a custom column in Power Query and used the Text.Repeat(“■”,[Passed]) formula to create a data bar composed of repeating characters.
I could then add these columns as Text to the Visio visual, position them and format their color to suit the Legend that is not automatically removed when the Visio diagram is displayed in Power BI.
It is a little bit of a hack, and it would be nice to have the choice of fonts that can be applied to text values in the Visio visual. Just imagine what we could do with Wingdings (x3) and Webdings!
See my earlier post for more information : Using Character Map Symbols as Data Graphic Icons
Leave a Reply