Page 1 of 1

rank function but within a column

Posted: Wed Jun 18, 2025 8:10 pm
by palmer83
Hello,

When I use the following in a calculated column, it does a ranking but based on the entire data in my data source (called WfGapPiv).
Totals.Rank(WfGapPiv, WfGapPiv.Gap, false,Stimulsoft.Report.StiRankOrder.Desc)

But I don't want the ranking to be based on my entire data but rather the rank within a group. How can I modify that so that it ranks within a certain column, in this case called PlanBc.

How can I get it to look like this?
PlanBc Gap MyCalculatedColumn
A 100 1
A 90 2
A 80 3
A 70 4
A 60 5
B 50 1
B 40 2
B 30 3
B 20 4
B 10 5

Re: rank function but within a column

Posted: Thu Jun 19, 2025 8:22 am
by Lech Kulikowski
Hello,

You can add an additional grouped source - DataTransformation, and then use the Rank function for the grouped source.

Thank you.