3 Replies Latest reply on Aug 9, 2018 10:33 PM by Padma Yalavarthi

# Ranking based on multiple measures

Hello,

I am trying to rank my customers based on Sales \$, Year over Year \$ growth and YoY % growth. Ultimately i want to rank each one of these measures individually and then sum the ranks. I am having difficulty thinking of an approach to solve this. Could someone please help.

• ###### 1. Re: Ranking based on multiple measures

Hi Bhaskar,

create 3 calculated fields like below i have taken superstore data example

Rank of sales:

RANK(SUM([Sales]))

Rank of Profit:

RANK(SUM([Profit]))

Rank Quantity:

RANK(SUM([Quantity]))

Overal Rank:

RANK(SUM([Sales]))+RANK(SUM([Profit]))+RANK(SUM([Quantity]))

Creata view like below

Hope this helps kindly mark this answer as correct or helpful so that it will help others

BR,

NB

• ###### 2. Re: Ranking based on multiple measures

Hello Naveen,

I am new to tableau. I want sales for just 2018 and to rank it. And then compare 2018 sales with 2017 for YoY \$ growth and YoY % growth and then rank it. The last step would be to sum these ranks. I try doing this and it gives me an error. "Cannot mix aggregate and non Aggregate". COuld you please help me with getting the sales for 2018, YOY growth which would help me get around the error?

1 of 1 people found this helpful
• ###### 3. Re: Ranking based on multiple measures

Bhaskar,

Create Below Calculation fields :

2018 Sales :

IF YEAR([Order Date]) = 2018 THEN [Sales]

END

2017 Sales :

IF YEAR([Order Date]) = 2017 THEN [Sales]

END

YOY Sales :

ZN(SUM([2018 Sales])) - zn(SUM([2017 Sales]))

YOY % :

[YOY Sales]/SUM([2017 Sales])

2018 Sales Rank :

RANK(SUM([2018 Sales]))

YOY Rank:

Rank([YOY Sales])

Total Rank:

[2018 Sales Rank] + [YOY Rank] Hope this helps!

kindly mark this answer as correct or helpful so that it will help others.

Regards,

Padma Y

1 of 1 people found this helpful