Top 5 Reasons Why Electric Vehicle Penetration Will Be Faster Than Analysts Project

Some people celebrate New Years, birthdays, July 4th… at Repower Group, we celebrate the day that the ‘BNEF Long-Term Electric Vehicle Outlook’ report is published. That was Monday. An INCREDIBLE…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Highlighting a measure column from many in Tableau

Highlighting one Measure Column (Pic by Author)

Recently, I was asked to highlight one measure out of a few measure columns in a text table using Tableau. And the user should have the facility to select the measure that needs to be highlighted. A casual search on the Net and I discovered a solution which needed a little modification. So, here I will detail the steps I took with respect to the text table and something in line with highlight tables.

For this, we will be using the SuperStore Dataset that comes along with Tableau.

First, decide the measures you want to highlight. Here, we will use Market as Dimensions and Sales, Profit, Discount, and Profit Ratio as measures. We will create four calculated fields — Sales Col, Profit Col, Profit Ratio Col and Discount Col. Each of these calculated fields will contain just 0 <Refer Fig 1>.

Fig 1 (Pic by Author)

Now place these four calculated fields in the Columns toolbar. You will see 0 in the axis of each. Place Sales, Profit, Profit Ratio and Discount measure in the Label Marks Card of each column<Refer Fig 2>.

Fig 2 (Pic by Author)

Bring the alignment of the text to the center via Label Marks card and remove the 0 from the axis. You can do this by right-clicking and selecting the edit axis. In the sub-menu “Tick marks”, select None as Major Tick Marks. Also edit the axis name. Do a little bit of cleaning up like removing the Grid lines, Zero lines, unwanted border lines and bands.

In the Marks card of each measure, select Text from the dropdown, instead of Automatic. This step may help us get rid of the centre line. Based on my experience with this centre line, my suggestion is that try all sorts of cleaning up, as mentioned above. One or the other step will definitely work.

Now, create a parameter. Name it “Highlight Measure Fields”. This will allow the used to select the measure that needs to be highlighted <Refer Fig 3>.

Fig 3 (Pic by Author)

Create four more calculated fields for each measure to manage the color and highlight the measure, selected in the parameter <Refer Fig 4>.

Fig 4 (Pic by Author)

Here, I have named them as Color for Sales, Color for Profit, Color for Profit Ratio and Color for Discount. Place them in the Color Marks card for each of the respective measures. Now the real adjustment starts <Refer Fig 5>.

Fig 5 (Pic by Author)

Setting the Color

The dataset has 5 markets (dimension field). However in Fig 5, you will notice that I have set Stepped Color as 6 and the Start field does not contain the lowest value. We will discuss the reason for that later but first I will detail the steps taken further. For reference, the HTML code for the green used here is #006b00.

What I decided to do was take the difference between the highest and lowest value of that measure and this difference was then divided by five as there are five markets. The outcome was deducted from the lowest figure and then placed as the start figure.

Then, one can wonder if there is a need to go through so much trouble. Yes, reason being, when one measure is highlighted then the rest of the measures should have a color which is not included in the highlighted one (in this case light grey).

2 Concerns

By now, few concerns must have started popping up in your mind. I’ll cover 2 here.

1. This method will probably work only with static dataset and not with live dataset. One of the probable solutions is to set the Start as the number which will form as alert for the client. And don’t stick to this way, tweak the figures until you get the desired result. Also, if you have another suggestion, please mention in the comment section so that anybody reading can benefit from your proposition.

With this, I’m finished with the improved version to this topic’s solution with the hope that Tableau will soon provide a way to dynamically change the start value in the Edit Color dialogue box.

Add a comment

Related posts:

Memilih dan Menerapkan Manajemen Konfigurasi Jaringan

Tim jaringan memilih langkah besar kala mereka menentukan untuk menyimpan keyakinan mereka pada alat management konfigurasi jaringan otomatis. Jadi membawa dampak pilihan alat yang pas dan kemudian…

How I Reconnected with My Estranged Father

The first time I have met my father face-to-face I was 27. It happened this summer, in the middle of a pandemic, after I have written him a message on Facebook, texting my number and asking to give…

A Whole New Take on Voting with Your Wallet

You probably know someone who’s left a relationship over political differences in the past few years. A conversation got heated over the dinner table. Each side’s viewpoints were intolerable to the…