6 Replies Latest reply on Jan 27, 2017 6:48 AM by Steve Taylor

# Formatting Blended Axes

Hey all,

I am hoping someone can help me with formatting a Blended Axes. Basically, I am wondering if we are able to format each Measure on the Blended Axes using a condition. For instance, in the example below, I have [Measure 1] and [Measure 2] for each [Category]. Is it possible to create formatting so that [Measure 1] shows green if above 99, and red if below 99. And [Measure 2] will show green when above 98 and red when below 98?

I have attempted using Table Calculations; however, my reference is always to the row in its entirety, so both bars will inherit the same formatting. I cannot seem to find a way to differentiate between the two marks so I can apply separate logical formatting.

Here is the basic setup of the view, and a snapshot of the dummy data. I have also attached a Workbook. Any help is greatly appreciated, thanks!

• ###### 1. Re: Formatting Blended Axes

Hi Josh

As measure 1 and measure 2 require separate logic for the colour formatting, having one marks card for both measures with one item on the colour shelf won't work.

You would need separate calculated fields to determine the colour for each measure, then have a separate axis for each measure in the view to get two marks cards onto which you can put your separate colour fields. i.e. use dual axis.

(NOTE to synchronise the axes you would need to convert measure 2 to a float)

See attached workbook

Thanks

Steve

1 of 1 people found this helpful
• ###### 2. Re: Formatting Blended Axes

Good point on the single marks card, Steve. The dilemma I am having is I was interested in combining the Blended Axes with a Dual Axis to create a lollipop chart as per below. So, in this configuration, I already burn my dual axis to create the separate marks. Do you think I am faced with an either-or situation? Either I use dual-axis to logically format each measure, or I use the dual-axis to create the lollipop, but lose my ability logically format each measure?

• ###### 3. Re: Formatting Blended Axes

I had a feeling the real-world application would be more complicated than the attached workbook!

I'm happy to be proven wrong but I don't think using measure names/measure values in this respect will enable the unique colour formating per measure.

IF you were to pivot the data before hand in the data source window (so you get Pivot Field Names and Pivot Field Measures fields) that might enable you to say something like:

// new field called Target

CASE [Pivot field name]

WHEN 'Measure 1' THEN 99

WHEN 'Measure 2' THEN 98

END

to get a target per measure then you could have a single calc field for colour that says

IF [Pivot Field Measures] >= [Target] THEN 'Green' ELSE 'Red' END

Is that something you've tried already? I'm going to give it a go and see if it works....

1 of 1 people found this helpful
• ###### 4. Re: Formatting Blended Axes

Seems to work.

Depends on your datasource whether you can use the tableau pivot function (flat files like excel/google sheets etc are fine). If it's a SQL datasource you can do the same thing but using unions for each measure. Let me know if you want me to run through that.

Steve

1 of 1 people found this helpful
• ###### 5. Re: Formatting Blended Axes

That will work! I can carve-out the data I need from source and pivot appropriately. Great job, thanks for the help!

• ###### 6. Re: Formatting Blended Axes

You're very welcome, glad it works for you.