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
Anonymous
Not applicable

Manual filter for slicer

Hey, I would like to have slicers in the following way: 

1st slicer: select company(forced single selection)

2nd slicer: select contract ids (multiple selections possible, but only 1 per year), so my question is: can I create a manual  filter for the id slicer, that if there has already been chosen 1 id for year x, then it is not possible to chose another id of year x

 

My table contains: company name, contract id, year as columns and some others

 

Thank you!

 

1 REPLY 1
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

Based on my research, It is not supported to implement your demand in Power BI currently.

As a workaround, you could create a measure that if there are more than one id is selected in one year, the result will not show.

For example:

This is sample data

2.JPG

Then write a measure

for filter = 
CALCULATE(DISTINCTCOUNT('Table'[contract id]),FILTER(ALLSELECTED('Table'),'Table'[year]=SELECTEDVALUE('Table'[year])))

And drag it into visual level filter and set is 1

3.JPG

Result:

4.JPG5.JPG

and here is sample pbix file, please try it.

 

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.