Forum Discussion
Add values while keeping Selected Slicer Value
Sample File with data is as below:
I have 2 tables:
1. Calendar table that has dates between 2022 - 2025
2. Events Table that has Event, Role, Department, Start date, End Date
Start Date has a relationship to the date in the Calendar table i.e. each date in the Calendar may have one or more events that start on a date.
I have 5 slicers: Role, Department on the Events and Year, Month, and Quarter on the Calendar table. Only one year can be chosen. But multiple positions and departments can be chosen.
I have a particular department, whose data needs to be shown irrespective of what role and department are chosen on the slicer.
The Measure calculation in the Events table is as follows:
MeasureEventPeriod =
VAR Startdt = CALCULATE(MIN(Events[StartDate]), REMOVEFILTERS('Calendar'))
VAR Enddt = CALCULATE(MIN(Events[EndDate]), REMOVEFILTERS('Calendar'))
VAR EventPeriod = MIN('Calendar'[Date])>=Startdt && MIN('Calendar'[Date])<= Enddt
VAR Result = IF(EventPeriod, 1)
Return Result
If the slicer selected Department = A, I want to show Department A & Z
If the slicer selected Department = B, I want to show Department B & Z
If the slicer selected Department = A & B, I want to show Department A & B & Z
If the slicer selected Department = Z, I want to show only Z
Or the other option is to not show Z in the slicer but include them in the visual. Visual is a matrix with Department and Role as rows and Months and Weeks as Columns.
Since the measure only involves Calendar, I am not sure how to filter and show rows belonging to specific Department
Sample File with data is as below:
2 Replies
- v-jialluo-msftCommunity Support
Hi GopVan ,
According to your description, you need to default to display Z department and other departments selected by the slicer when the slicer does not select Z department.
But this may not be possible, depending on how the slicer works, you need to select the Z department normally to display properlyBest Regards,
Gallen Luo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- GopVanFrequent Visitor
Is it possible to manipulate the select values to include the default department?