How to use an aggregate function in an aggregate function?

In SSRS, I have the following code for one of my fields:

(DateDiff("n",FIRST(Fields!Date.Value), LAST(Fields!Date.Value, "grp_Order")))

Now I want to take AVG from all of these fields .... How do I do this without getting a nested cumulative error?

+3
source share
1 answer

I think I remember how it was done in Crystal Reports ....

Can you put the code in the field and then take avg of this new field?

Field 1 → the code behind: (DateDiff ("n", FIRST (Fields! Date.Value), LAST (Fields! Date.Value, "grp_Order")))

Field 2 → code behind: AVG (field 1).

I would suggest that field 2 can only exist @ at the end of the group in which field 1 exists.

0
source

Source: https://habr.com/ru/post/1752715/


All Articles