6 Replies Latest reply on Aug 9, 2018 12:14 PM by Lauren Lisowe

# Need to add different goals for different measure names

I have two measures that I need displayed as a bar graph. I am using Measure Names/Values to pull both onto my sheet. I want to be able to compare each measure against a distinct goal amount, but I'm having a hard time figuring out how to do so. I've attached the way I want it to look as well as a sample workbook.

• ###### 1. Re: Need to add different goals for different measure names

Hi Lauren,

I put bunch of views together that might help you. You can achieve this in few ways using dual axis, bar chart with reference lines, Bullet graph.

Related threads you might find useful,

Re: How to create separate reference lines per pane without overlap?

Use different measures as reference lines

Hope this gives you some direction.

Best,

Shiva.

• ###### 2. Re: Need to add different goals for different measure names

The problem is that our goals are just a set amount per line. So POPS goal would be 50 and POLS might be 80. There is no formula to determine per line. And I can’t figure out how to get those goals into a formula to do what you’ve described on your workbook.

Lauren Lisowe

• ###### 3. Re: Need to add different goals for different measure names

Hi Lauren,

Sorry couldn't spend much time this morning to try this out, but I found these links which I hope will get you started. You might want to use Parameters to user input the goal values.

Reference line using Parameter - search results

Let us know if you need further help.

Best,

Shiva.

• ###### 4. Re: Need to add different goals for different measure names

Unfortunately these also do not help because our POPS and POLS are measures, not dimensions. So I can’t say “If Dimension = ‘POPS’ then , etc. That is where I am getting stuck.

• ###### 5. Re: Need to add different goals for different measure names

Lauren,

I'm not sure if this is going to work for your setup,but here is one method that might give an idea:

Vizible Difference: Turning Measure Names into a Dimension

The main issues are, as you've seen, that:

-MeasureNames/MeasureValues can't be addressed in a calculated field or Index

-calculated fields can't be pivoted

I'm not sure if the method in the link above will work for your true dataset,

but I tried it out.

Basically, I made an external excel worksheet which is simply

a column header "MetaName" and then POPS and then POLS.

This is added as a new datasource.

Then on a new sheet with the new excel as the Primary datasource,

I created the calculated field:

CASE ATTR([Meta Name])

WHEN "POPS" THEN [OLGA Test (OLGA Test)].[POPS]

WHEN "POLS" THEN [OLGA Test (OLGA Test)].[POLS]

END

The Goals then became:

IF [Meta Name]="POLS" THEN 4

ELSEIF [Meta Name]="POPS" THEN 1

END

I'm not completely sure about the values that are showing for POLS and POPS

because it was sounding like they were supposed to be less than 1.

Regardless, I think the general idea should work.

Likely this can also all be done in Tableau Prep as well.I will investigate.