Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Rank() Function

Hi All,

It seems I could not achieve the desired result in my Table.

I have a Table of "Positive 1 STD Exceptions", Where each raw appear only if it is a "Positive 1 STD Exception".

That Table includes 3 dimensions: App, Advertiser and Campaign.

I would like to add a column as an expression labeled "Main Partner" to that table, where I will see the name of the partner which brought me the most revenue (from yesterday and belongs to  "PartnerReport", as you can see in my set analysis).

My Expression is:

=if([Exception type]='Positive 1 STD Exception',

if(rank(sum({<isYesterdayDate={'1'},PartnerReport={'PartnerReport'}>} (ClickCost+InstallCost)/100)) <2, partner_name)

)

***Exception Type Should NOT be part of the set analysis, please do not answer with this as your answer...

I seem to be getting Null only as my results....

Can you Help?

Kind Regards,

Ella.

13 Replies
Not applicable
Author

NO

It works alright in the QVW I put because there is only 1 partner there, but when I move it to my original QVW it just returns all partners with concat...

Not applicable
Author

This works in the QVW I uploaded, where there is only 1 partner,

however, when I use it in my original QVW (with many partners) it only returns the answer in the raw where the suitable partner was the partner that gave the most profit from all others.

In any other raw it does not returns an answer, but shows "-".

Not applicable
Author

Hi Elula ,

Now i cleared with your actual requirement , that you want to list all the partner name right .

Use following expression , hope it will works

if([Exception type]='Positive 1 STD Exception',
concat(if(aggr(rank(sum({<isYesterdayDate={'1'},PartnerReport={'PartnerReport'}>} (ClickCost+InstallCost)/100)), partner_name)>0,partner_name),','))

All  the best . Happy Learning .


Not applicable
Author

No

I see I need to upload a new QVW with more data...