5 Replies Latest reply: Aug 15, 2016 2:49 PM by Sunny Talwar

# How to use rank showing one item

Hi. I have this qvw where I show sales by Name ranking depending on the year/quarter selected.

It works but I need to have the option to select just one Name and show like this:

Name: John

Rank: 4

Direct: \$580,000

Reinsurance: \$ 630,000

Considering that Rank is based in the Sales like the dinamic table on the right

And Considering that Direct and Reinsurance are the 2 vales for Type dimension

I´ve already created a separeted variable called vName

• ###### Re: How to use rank showing one item

Like this?

Check attached

• ###### Re: How to use rank showing one item

I had no idea that multiplying like this would work. Can you tell me why?

• ###### Re: How to use rank showing one item

Avg(1) = 1 for the dimension which are selected and Avg(1) = 0 making the dimension value 0 for those rows which are not selected. This solution is a quick and efficient alternative to using an if statement...

If(Sum(Sales) > 0, Sum({1<[Reporting Calendar Year]={'\$(vYear)'},[Reporting Calendar Quarter]={'\$(vQuarter)'} >} Sales))

Here Sum(Sales) = 0 where the name is out of selection while Sum(Sales) > 0 for things that are selected.

Does this help?

Best,

Sunny

• ###### Re: How to use rank showing one item

Yes, thank you so much!

• ###### Re: How to use rank showing one item

No problem at all