8 Replies Latest reply on Feb 25, 2015 5:23 PM by Radha Dorairajan

# Arrows for multiple metrics based on percent differences

Hello all.  If you refer to the attached TBWX file, my requirement is to show arrows (up shape for increase since prior period, O for no change since prior period, and finally a down shape for decrease since prior period).  I know conceptually that this would require a table based calculation to get percent difference for each of the metrics.  Per the dashboard, I would like to have the shapes/arrows be displayed along with the 3 metrics that you see at the top of the dashboard:

- PV w/ Advertiser

- PV w/ Editorials

- PV w/o Rslts

The dashboard is by WEEK.  Hence, I would like to capture percent differences between current week vs prior week.

How can I deploy dynamic shapes/arrows based on the metric changes? And how can I do this for 3 metrics?  I saw posts on this in pieces. I was having trouble doing this for multiple metrics.  If anybody has a sample TBWX file that they can share, that would be great!

• ###### 1. Re: Arrows for multiple metrics based on percent differences

Hi there.  Any ideas or feedback please?

• ###### 2. Re: Arrows for multiple metrics based on percent differences

Hi Michael,

I was unable to view your workbook as it had some external connections which I was not able to access. Please create a data extract and then package the workbook and share it.

Nevertheless I tried to answer your question based on the inputs you had given. I have created the same for one measure. This can be extended to more measures as per requirment. Here are the steps.

Create a calculated field with the following if else statement.

if(ZN(SUM([Sales])) - LOOKUP(ZN(SUM([Sales])), -1))<0 then 'Negative'

elseif(ZN(SUM([Sales])) - LOOKUP(ZN(SUM([Sales])), -1))=0 then 'Zero'

elseif(ZN(SUM([Sales])) - LOOKUP(ZN(SUM([Sales])), -1))>0 then 'Positive' end

Here my measure name is "Sales" and I am studying the sales growth.

After creating the field, use the Crosstab visualization and change the marks type to "symbol". Drag and drop the field u created on to the shapes shelf. The triangle in the pill  shows that it is a table calculation. Click on the pill to get a dropdown where you can edit the table calculation properties. In my case , my time period is in columns and I want to calculate the difference from my previous value along the row. Therefore I chose " Table(Across)" in the "compute using" options. Since this is a table calculation, no matter what level of granularity you are on (year, quarter, month, week, day) it will always calculate in comparison to the previous value.

Once the table calculation is set, you can define the symbols you need for depicting the different values in the edit

shapes window. Use a blank PNG image for the null item to hide the symbols in the first column. Please refer to the following article for custom shapes. Custom Shapes . Please find the tableau file attached.

• ###### 3. Re: Arrows for multiple metrics based on percent differences

Hello Radha.  Attached is the TBWX file.  I shall read thru your recommendations above.

• ###### 4. Re: Arrows for multiple metrics based on percent differences

Hi Radha.  I attempted to do this for 3 metrics within the same cross-tab/work-sheet.  I attempted that by extending out the calculated metric:

if(ZN(SUM([PV w/ Advertiser])) - LOOKUP(ZN(SUM([PV w/ Advertiser])), -1))<0 then 'Negative'

elseif(ZN(SUM([PV w/ Advertiser])) - LOOKUP(ZN(SUM([PV w/ Advertiser])), -1))=0 then 'Zero'

elseif(ZN(SUM([PV w/ Advertiser])) - LOOKUP(ZN(SUM([PV w/ Advertiser])), -1))>0 then 'Positive'

elseif(ZN(SUM([PV w/ Editorials])) - LOOKUP(ZN(SUM([PV w/ Editorials])), -1))<0 then 'Negative'

elseif(ZN(SUM([PV w/ Editorials])) - LOOKUP(ZN(SUM([PV w/ Editorials])), -1))=0 then 'Zero'

elseif(ZN(SUM([PV w/ Editorials])) - LOOKUP(ZN(SUM([PV w/ Editorials])), -1))>0 then 'Positive'

elseif(ZN(SUM([PV w/o Rslts])) - LOOKUP(ZN(SUM([PV w/o Rslts])), -1))<0 then 'Negative'

elseif(ZN(SUM([PV w/o Rslts])) - LOOKUP(ZN(SUM([PV w/o Rslts])), -1))=0 then 'Zero'

elseif(ZN(SUM([PV w/o Rslts])) - LOOKUP(ZN(SUM([PV w/o Rslts])), -1))>0 then 'Positive' end

The above does not seem to work.   Any ideas on how to do all 3 metrics?

• ###### 5. Re: Arrows for multiple metrics based on percent differences

Hi there.  Any feedback on multiple metrics plz?

• ###### 6. Re: Arrows for multiple metrics based on percent differences

I've never found a way to interlace the number & arrow for multiple measures on a single worksheet. What I usually do is to create different sheets and put them on a dashboard in the right format so it looks like they are interlaced.

1 of 1 people found this helpful
• ###### 7. Re: Arrows for multiple metrics based on percent differences

Thanks Chris.

Mike

• ###### 8. Re: Arrows for multiple metrics based on percent differences

Hi Michael,

I was trying to find a way to solve your problem. It is not possible to have all three measures with symbols in the same view. You can use 3 sheets for the three metrices and arrange them one next to each other. You can also use a different chart type like a bar or a line which depicts the trend quite easily without having to use symbols.