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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
oakfootballclub
Helper IV
Helper IV

how to set the slicer always select the maximum value of a field

Hi experts, how to create a slicer based on a column that it's value may changes by different refresh
but always select the maximum as default, and the slicer should be able to select multiple values.

do you know how to make it?

1 ACCEPTED SOLUTION
v-yohua-msft
Community Support
Community Support

Hi, @oakfootballclub 

I create a sample table:

vyohuamsft_0-1720405134234.png

Then create a caculated column and try the following dax:

IsMax = IF([Sales] = CALCULATE(MAX([Sales]), ALL('Table')), "Max", "Not Max")

Create a slicer based on an IsMax column. By default, the slicer is set to display a Max value. Use the selection pane to hide the slicer.

vyohuamsft_1-1720405339428.png

 

vyohuamsft_2-1720405436447.png

Assign a bookmark to a button or image, so when you click on it, the slicer will select the "maximum" value.

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

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

View solution in original post

5 REPLIES 5
v-yohua-msft
Community Support
Community Support

Hi, @oakfootballclub 

I create a sample table:

vyohuamsft_0-1720405134234.png

Then create a caculated column and try the following dax:

IsMax = IF([Sales] = CALCULATE(MAX([Sales]), ALL('Table')), "Max", "Not Max")

Create a slicer based on an IsMax column. By default, the slicer is set to display a Max value. Use the selection pane to hide the slicer.

vyohuamsft_1-1720405339428.png

 

vyohuamsft_2-1720405436447.png

Assign a bookmark to a button or image, so when you click on it, the slicer will select the "maximum" value.

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

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

elitesmitpatel
Solution Supplier
Solution Supplier

please share the pbix file 

bhanu_gautam
Super User
Super User

@oakfootballclub , To achieve this we can use Custom column and Measure

 

First create a calculated column which identifies maximum value in the column you want to use for the slicer

MaxValueFlag =
IF(
'YourTableName'[YourColumnName] =
CALCULATE(MAX('YourTableName'[YourColumnName]), ALL('YourTableName')),
1,
0
)

 

Then create a measure to identify the maximum value in that column


MaxValue = CALCULATE(MAX('YourTableName'[YourColumnName]), ALL('YourTableName'))

 

Create a Slicer:

Add a slicer to your report.
Drag the column you want to use for the slicer to the slicer visual.
Set the Default Selection to the Maximum Value:

To set the default selection to the maximum value, you need to use a bookmark.
First, select the slicer and choose the maximum value manually.
Go to the View tab and enable Bookmarks.
Click on Add to create a new bookmark and name it (e.g., "DefaultMaxValue").
Make sure the slicer is set to allow multiple selections by enabling the "Select Multiple" option in the slicer settings.

 




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






you mean that there are two pages according to bookmark, one page is max value and the other is other multiple selection page? how to make it without bookmark?

Actually there is one bookmark for Default slicer setting and other is slicer setting to allow mutiple selections

 

Currently there is no other way to set default slicer value




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors