Announcements

# TOP & BOTTOM in the same object/chart

cancel
Showing results for
Did you mean:
Specialist II

## TOP & BOTTOM in the same object/chart

Last Update:

Sep 21, 2022 10:07:35 AM

Updated By:

Sue_Macaluso

Created date:

Apr 24, 2019 3:47:16 AM

As a result of our work always in search of the smarter solutions, we explain how to create a top and bottom in the same chart ...

This example is for a TOP & BOTTOM 5

First create your top and bottom ranking using a calculated dimension...

Choose Bar Chart / Style Orientation - Horizontal

=IF(Aggr(Rank(Sum(\$(vYourMeasure)),4),\$(vDimension))<=5,\$(vYourDimension)
,
IF(Aggr(Rank(-Sum(\$(vYourMeasure)),4),\$(vDimension))<=5,\$(vYourDimension),4),\$(vYourDimension))<=5,\$(vYourDimension)))

Sum(\$(vYourMeasure))

Different colors to differentiate between positive and negative...

=if(Sum(\$(vYourMeasure))>=0,RGB(0,146,69),RGB(255,0,0))

Sort...

Sort your calculated dimension by the use of the expression... Your expression:  Sum(\$(vYourMeasure)) ... Descending...

Feel free to modify further parameters like Presentation, Axe, etc...

André Gomes

Tags (1)
Contributor

Hi André,

Thanks a lot for this, this gave me a lot of inspiration!

I do think I have found an easier expression when starting with yours:
If(Rank(vYourMeasure) <=5 or Rank(vYourMeasure*-1)<=5, vYourMeasure)