Forum Discussion
Dynamic content filters based on UserId, StartDate, EndDate and possible movement between groups.
Hi Shaun2020 ,
Sorry I'm not very clear about the problem, could you please give an example to clarify it?
Best Regards,
Community Support Team _ kalyj
Hi
I'm trying to make a hard coded filter dynamic. The variables are UserId, StartDate, EndDate, Group
If there is an end date and the user is not moved to a different group then their data should be filtered out as they may have moved completely to another department that I don't report on.
Does this make any sense?
My User table will look like this
| UserId | FullName | Group | StartDate | EndDate |
| GeorgB | George Budge | Group1 | 01/01/22 | |
MaryM | Mary Murry | Group1 | 01/01/22 | 10/06/22 |
| FredF | Fred Flintsone | Group2 | 01/01/22 | 24/08/22 |
| CarlM | Carl Mills | Group3 | 01/01/22 | |
| MaryM | Mary Murry | Group3 | 11/06/22 |
Sorry, this table does not display correctly.
The other two tables of data all have the UserId which is common, also an activity date, so I'm currently linking the tables and using RELATED or RELATEDTABLE, (Sorry I'm writing this from memory as I'm on a different task right now.) to add the FullName and was adding the Group, but now have people being shifted between groups. The Users table consits of three group tables that I have appended in PQ for ease of use.
I am wanting to change my report to update according to the user table values.
The report itself uses slicers to select a month or a range of months and the group to show the users, the group they are in and their activities, which are using measures in a couple pivot tables. I can also select for which group I wish to see activities. For Management they may need to see all the groups and all months selected.
I can see this being a problem where a user has shifted in the middle of a month or more than a single month is selected as the user will then appear twice, as they will be in different groups.
I would like to find a solution to do this as I was told yesterday that the users and groups I report on will be doubling and there will be more restructuring and users being moved around.
I can see that I will have to move to Power Bi going forward.
So for UserId I need to create a parameter, also for the start and end date. If the user appears more than once, the date must be checked and the group during that selection and so on.
Does this help?