6 Replies Latest reply: Feb 17, 2014 5:56 AM by Fernando Araujo

# problem with rank in the set analysis

hello to all

I'm with the following problem

have to find the greatest competitors of my client

I am using this expression

only ({<Group= {"=rank(sum([Ingresso Total] ),Grupo) 1"}>} = Group)

and

only ({<Group= {"=rank(sum([Ingresso Total] ),Grupo) 2"}>} = Group)

it returns me exactly what I seek, I put the two expressions in two variables.

Only then used the vTOPGrupo variables and vTOPGrupo2 respectively

sum ({<Modalidade {'Presencial'}, Group ={\$(=\$(vTOPGrupo2))} =>} [Total Joined])

The problem is that some groups zeroed return and use the same expression

setting the group name that appears wrong, this way

sum ({<Modalidade {'Presencial'}, Group ={'XXX'} =>} [Total Joined])

it returns the correct value, and I'm seeing the same group

can someone help me

• ###### Re: problem with rank in the set analysis

=rank(sum([Ingresso Total] ),Grupo) 1

don't seem right to me. Are you sure this is how they look and that's it not a typo in your post?

I would have expected something like

=rank(sum([Ingresso Total])) = 1

BTW, what is Grupo?

In anyway, your search expression doesn't return Group field  values, so you can't compare it to a modifier like {'XXX'}.

I think it would be best if you could upload a small sample application.

Regards,

Stefan

• ###### Re: problem with rank in the set analysis

was a mistake in typing the correct is

only ({<= {Group "= rank (sum ({<Modalidade {'Presencial'}>} = [Total Admission]), Group) = 1"}>} Group)

Grupo is group in portuguese.

in these variable

vTOPGroup =only ({<= {Group "= rank (sum ({<Modalidade {'Presencial'}>} = [Total Admission]), Group) = 1"}>} Group)

i'll return a group field value correct?

i use this variable in that expression

That return to me the value with misses  or null ( only in a few cases

but if  the expression be like this

being that vTOPGroup also returns me XXX

the result is right.

Sorry for the poor english is not the strong in my country

I cant make a sample because  the qvw is too big and the cases only show yourself with a huge base .

thanks Stefan

• ###### Re: problem with rank in the set analysis

I am still unsure if your expression is correct, but anyway, if vTopGroup returns the correct group e.g. when using

=vTopGroup

in a text box, I think you should write

• ###### Re: problem with rank in the set analysis

I also thought it would work the same way but is not q happens.

I'm having trouble attaching the test in the forum, so I'm sending a link to the dropbox.

This same function that returns null in some other selections returns the correct value.

https://www.dropbox.com/s/x81nz76fr4k0ogt/test.qvw

• ###### Re: Re: problem with rank in the set analysis

Check attached.

• ###### Re: problem with rank in the set analysis

the forms of declare a function in variables and how you put into a set analysis is pretty confusing.