none
Funcion"ORDEM.EQ" RRS feed

All replies

  • Let's say you have a table MyTable with a field MyField. You can computer the rank of MyField in a query based on MyTable. Add a calculated column:

    Rank: DCount("*","MyTable","[MyField]>" & [MyField])+1

    or

    Rank: (SELECT T.Count(*) FROM [MyTable] AS T WHERE T.[Myfield]>[MyTable].[MyField])+1

    This is for ranking in descending order (the largest value has rank 1). If you want to rank in ascending order, change > to <.


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    Monday, June 25, 2018 12:59 PM