PowerBI Legends through formatted text
Syed Ahmed Ali ???? ????
Data Analyst @ Majid Al Futtaim | Data Analyst, BI Developer | Power BI, SQL, Python
Text is the most under utilized tool in visuals. Few days ago I saw a post by Christopher Chin where is showed a unique way to show legend in a visual, and I was trying to figure out how to recreate it in PowerBI such that it is dynamic(change with filter) and show different color is a single text. The cool part is, you don't even require to write DAX for it.
This was the post by him which you can read from here :
So to create this, you use textbox. Yea! textbox. It is so much more uselful than I though.
In the textbox, you select particular text and change its formating which for only the required text, unlike text inside the shape, or in a visual, where formating is the same for the whole text string.
However, the real thing is how to add measures to it. Actually it is very easy.
There is an option +value, click on it and it will open a panel, here you can type what calculation you want. In this example, I have a measure called profit, and I want profit for audio and video, as I type it, power bi will give me suggestion which you can select and check the value
领英推荐
Select the calculation you want, give it a name and format its type. You can create multiple values and save them, which then can be view and added as text from review. The values are interactive, which means it changes with filter. Moreover, it doesn't have to be numbers, you can add text based on selection as well, such as month, year, name etc.
In the end, you can place the curser and click + to add the value in that part of the text, which you can format according to your need.
Moreover, the text would have an underline(hyperlink), which shows that this text is a value and when you click on it, it will take you to the edit part of that calculation, but it is not shown in the published report, only in edit view.
And that's it. There is so much room to use this trick, especially as formated string as a tool tip, since tool tip shows only one selection, so for instance you can use product name, and when you hover over a certain product, it will show its name and value only
Clinical Data Analyst
2 年Excellent! That is good storytelling!
Leer Power BI met Power Up
2 年Thanks Syed Ahmed Ali . How did you color the font for the measure values?
Data Translator, giving data meaning. Ensuring analytics delivers business results. Podcast Speaker.
2 年Nice formatting Syed Ahmed Ali, I definitely think this is a great replacement for a legend. It also tells you all the information you need without the doughnut.
What the heck is Garvin 5.0?
2 年Interesting and potentially useful. I either case, you are making the viewer "work" They see yellow or green and then need to adjust their gaze to decode. Why not just label the slices? At the same time, you can add a Tooltip which includes additional information in context where it counts. By its very nature, a Donut Chart is not intended to provide great detail at first glance. Magnitude is obvious, A/V is twice that of Appliances. I'm not sure additional header text adds any value.
SQL ,Power BI, Advance Excel
2 年Awesome Syed I really like the tricks you find it ...