Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
GopVan
Frequent Visitor

Add values while keeping Selected Slicer Value

Sample File with data is as below:

PBIX File

 

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:

PBIX FIle Link

2 REPLIES 2
v-jialluo-msft
Community Support
Community 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 properly

 

Best Regards,
Gallen Luo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Is it possible to manipulate the select values to include the default department? 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.