has anyone been able to use the aggregate version ...
# suiteanalytics
d
has anyone been able to use the aggregate version of
RANK()
or
DENSE_RANK()
as detailed here? (the example they give is
DENSE_RANK ({amount}) WITHIN GROUP (ORDER BY {AMOUNT})
, which doesn't work) The analytic version is doing what I want, but it's weird that I can get the aggregate version working given the example NS provides.
m
Hey i have use formula with rank
d
yeah, I've used
KEEP(DENSE_RANK FIRST|LAST...
successfully. Although, in that example, is there any difference between that formula and just using
When Ordered By Field
(see screenshot)
m
When Ordered By
probably just uses that internally. I recall it being buggy in SuiteScript and having to use DENSE_RANK directly
d
no surprises there. I'll try to remember that one
any insight into the aggregate version of dense_rank that accepts expressions/params?
DENSE_RANK(exp1 [,exp2 [...]])
m
What are you trying to achieve? From what I understand the aggregate version of DENSE_RANK is not intended to operate on a table column. It's used to rank a hypothetical row. So I don't understand what
DENSE_RANK ({amount}) WITHIN GROUP (ORDER BY {AMOUNT})
is supposed to do.
d
I don't actually have a use case for it, just trying to understand how to use it after seeing it in the help docs. just to confuse things, the techonthenet example for the aggregate version seems quite different to the NetSuite example. ¯\_(ツ)_/¯ oh well. thanks once again Michoel