Thanks for your reply but your indicacion doesn't solve my problem. Your expression just show the average of the Ded_day field regardless of the year or month selected or the area or department to which the user belongs.
For example, for user 2, if selected year is 2019 and month 1, weighted average value for his area (HR in my example) must be 3,608
Adding a comment to kick this one back up in the list given you attached a QVW to see if anyone else may have any ideas on things. Unfortunately I am not too swift with the development items. About the best I could guide you would be to check out the Design Blog area and the posts there to see if you can find something that will help:
Hi! Really appreciate your help. I've been checking the links and I've seen interesting things that I didn't know. Given my knowledge, I don't see the way to get the data I need. It may be too complicated Thank you for your help and for your time. Regards
In the Weighted average table I calculate the average of the field I need to compare the average of the ded_day field for each user of both the selected period and the same period of the previous year. In principle I don't know if using the avg function is correct. What I need is in a table (or graph) to compare the average of the field ded_day of each user with the average of the same field of the department (Dep) and Area (Area) to which they belong in the year (and month or months selected) and from the same period of the previous year.
So in the table must appear the user, their average of the ded_day field for the selected period and the average of the same field for the area and department to which it belongs
taking into account that an area can contain one or more departments