8 Replies Latest reply on Jul 18, 2016 5:59 AM by Michael Hesser

# High Arrow and Down Arrow

Hi

I have report like

2015--> 3000 USD : 2016--> 2000 USD

( Year and Total )

If 2015 values is greater than 2016 means my arrow should be red else green.How can achive this.

and Year should be filter. If I select year 2012 then my report should be display 2012 and 2011 (1 year before),If I select filter 2013 then my table values is 2013 and 2012 total values.....

Thanks

Govind R

• ###### 1. Re: High Arrow and Down Arrow

Hello Govind!

There are a number of ways to do this, but much of it depends on how your data is set up.

Do you want an unshown arrow out to the side that shows the comparison? This is fairly easy to do, but it's best if we understand the shape of your data first.

Perhaps you could post a small .twbx?

If you want the arrows within the string above to change colors, this can be done, too, but it's a little trickier. You can string together multiple values (or shapes) and manipulate their colors. This video will walk you through that process:

Essentially, you'll need to create a calculation that compares the two values.

Then you can string together several columns to get the result you need, controlling the color of arrows based on the comparison calc.

I'm pretty enamored of the creative use of dummy measures and dimensions outlined in the video.

Talk soon!

• ###### 2. Re: High Arrow and Down Arrow

My requirement is

Arrow (RED or Green ),2016,2015

Red,2000,3000 (if 2016 value is greater than 2015 values then Red else Green).

and I have filter. Once selected my filter it should change dynamically my values and arrow.

How can I achieve this.

• ###### 3. Re: High Arrow and Down Arrow

Hello Govind;

Can you please post a sample .twbx, even if it is a few lines of made-up data.

Joe Oppelt has another great take on this:

Create two calcs.  If one condition, then set the first calc. (If you have no ELSE clause, then the negative condition results in null.)  If the other condition, set the second calc.  Throw both in the text shelf side-by-side in the text editor.  Format each as you want it.  (Note, for retweeet, I added "Retweet" in the calc, and on the text shelf I bolded and italicized it.)

Talk soon!

• ###### 4. Re: High Arrow and Down Arrow

Hi Govind;

1 of 1 people found this helpful
• ###### 5. Re: High Arrow and Down Arrow

Superb.

• ###### 6. Re: High Arrow and Down Arrow

Thanks a lot.If possible explain pls and steps also.

• ###### 7. Re: High Arrow and Down Arrow

HI

I created all  calculation and formula.While dragging into canvas,I am not able to achive please help me.

And Why you given date filter like date=choosen date or date=choosen date +1  ...

Thanks.

• ###### 8. Re: High Arrow and Down Arrow

Hello Govind...

Here are the steps I took (and how you can make your sample work, as well!)

• I started with a parameter called [Choose Year] which will allow the user to determine which year the data will begin with. This is just a list of integers, imported from the [Date] dimension.
As you can see below, I modified the Display Format to remove the thousands separator to make it look more like a year.

• Once I have my year parameter created, I'm ready to make five new calculations. (These names are slightly different from the sample I gave you, but the calculations are the same)...
• Year Current: This is a discrete integer that transforms the [Choose Year] parameter into a value.

• Year Previous: This is a discrete integer that transforms the [Choose Year] parameter into a value, minus 1. By subtracting 1, we're generating the year that came before [Year Current]. You could also make this calculation into [Year Current]-1 if you wanted!

• Year Current Sales: This is a discrete integer Level of Detail calculation that basically states: Sum the sales [Dollars] IF the year is equal to the the user-selected year.

• Year Previous Sales: Just like above, this is a discrete integer Level of Detail. It does the same thing as above except it creates the sum only for the previous year. You could exchange ([Choose Year]-1) with Year Previous here if you'd like...

• Arrow: Last but not least-- and this is where the true magic happens-- a very simple calculation. This just compares the two values you're scrutinizing and tells you if one was greater than the other. Note: to make this more user-friendly, you can change the results from T/F to something like "Sales have increased" else "Sales have decreased." You can even add a third option for "Sales have remained the same."

That's it for the calculations, but there a few more steps to take.

• In order to view only one year and its "sister year", I added [Date] to the filter, but I added some conditional logic to it: I made sure that the only dates displayed are equal to the [Choose Year] parameter. Note: initially I included an extra line here for (Date = [Choose Year] +1). That line is unnecessary.

• I dropped the first four calculation onto the rows column, making sure they were discrete. Important: in the example you gave me, your values were still continuous (green pill). If you change these to discrete (blue pill), you'll see your example suddenly become much more like the one I shared with you!
• Now the fun part!
• I changed the Marks card from automatic to Shape
• I dropped [Arrow] into Shape and chose appropriate arrow types based on the comparison (up or down)
• I also dropped [Arrow] onto Color and selected the colors I wanted (red for down, green for up).
• You may see I added a few other bells & whistles ...
• I formatted [Year Current Sales] and [Year Previous Sales] to include the USD Suffix. I also reduced the number of decimal places. You can make a calculation to do this, of course, but I just think formatting is a little easier and reduces the number of calculations you see.

I'm glad I could be of help to you! Please let me know if you have any questions!

1 of 1 people found this helpful