I wanted to calculate Rank function for 3 files with Sales Values how to arrive that in attached QVF any Idea?
Thanks in adv
Message was edited by: vikas mahajan
you already calculated the Rank for that Table.
if your files have the same structure, load them all (using * for example) after that Create the Rank like you did on your app.
Thanks for reply can you please modify the script ? I am getting incorrect ranks for the same
What is the expected output?
Modified QVF , Actually I have Comp,Prod,State fields as a dimensions and Sale I wanted to find each company Rank of product sold in state.
Like Comp Prod State Rank
A MS S1 2
A HS S2 1
B HS S1 3
B MS S1 1
What did you modify? I see the same information in the Rank.qvf...
I have modify some inline columns please check this image
May be this
LOAD * INLINE [
If(State = Peek(State), RangeSum(Peek('Rank'), 1), 1) as Rank
order by State, Sale desc;
DROP Table INPUT;
Do you have to do it in script? You can use rank function in the chart like this:
If you require to perform rank option in back end try this,
Autonumber(Sale,Key) as Rank
Order by Sale desc;
drop table test;
where Key is a composite key of COMP& "Product Group"&STATECODE .
Hope this helps.
Retrieving data ...