- Create a new Dimension in the Master items library.
- In the dimension editor, select the expression editor for the field.
- Add the following expression:
=Aggr( If(Rangesum(Above(Sum(Sales)/Sum(Total Sales),1,RowNo()))<0.8, 'A', If(Rangesum(Above(Sum(Sales)/Sum(Total Sales),1,RowNo()))<0.9, 'B', 'C')), (Country,(=Sum(Sales),Desc)) )
- Set the label with ABCClassification.
- Click on Add Dimension.
- Click on Done.
- Now, add a Table object to the content area.
- Click on Add column and select Dimension, and then click on ABCClassification in the dimension list.
- Add a second dimension and select the Country field.
- Click on Add column and select Measure, and then type in the following expression. Label it as Sales:
=Sum (Sales)
- Change the Number formatting of the Sales measure to Number.
- The result will look like the following screenshot:
- Add a Bar chart at the top of the content area.
- Click on Add dimension and select the Country field.
- Click on Add Measure and type in the following expression. Label it as Sales:
=Sum (Sales)
- Under Appearance, go to Colors and legend and switch Colors to Custom.
- Select By expression and type in the following expression:
=Aggr( If(Rangesum(Above(Sum(Sales)/Sum(Total Sales),1,RowNo()))<0.8, green(), If(Rangesum(Above(Sum(Sales)/Sum(Total Sales),1,RowNo()))<0.9, Yellow(), Blue())), (Country,(=Sum(Sales),Desc)) )
- The result will look like the following screenshot