Detect the last group in a crosstab

2 posts, 0 answers
  1. Ken
    Ken avatar
    3 posts
    Member since:
    Apr 2015

    Posted 13 May 2015 Link to this post

    I need to use a special expression in the last group in a table. The first row I can detect by using

    RowIndex("crossTab1") = 1
    I want to use the same logic to detect the last group, but I can't find any indications of number of groups in the table or number of rows in a group (other than using COUNT aggregate).
    I have now found a way to solve it by using

    RowNumber("crossTab1") = EXEC("crossTab1", CountDistinct(Fields.Month))

    However I feel that it is ineffective to count all rows in all groups. Is there a better way to accomplish this?


    Best regards,


  2. Nasko
    Nasko avatar
    1045 posts

    Posted 18 May 2015 Link to this post

    Hello Anders,

    There isn't another global object/specific function other than the Count/CountDistinct aggregate which will return the number of group rows in the current group. Thus, your approach to compare the row number with the month count is the recommended solution.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top