SSRS question about calculating dates from a grouped field

I have an SSRS field called dates. I calculated the difference between the last and the start date using the following code:

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

Code.MinutesToHoursMinutes is a function that makes hours format in minutes.

How do I now average all of these ?????

0
source share
1 answer

What mean if you already use FIRST and LAST? And why, please, only for LAST?

In any case, the average value is on DateDiff("n",FIRST(Fields!Date.Value), LAST(Fields!Date.Value, "grp_Order"))or another expression, and not on the function Code.MinutesToHoursMinutes, no?

So, in the middle text box:

=Code.MinutesToHoursMinutes(Avg(`DateDiff("n",FIRST(Fields!Date.Value), LAST(Fields!Date.Value, "grp_Order"))

... or something similar.

0
source

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


All Articles