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?