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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
cg1980
Helper I
Helper I

Slicer obtain the max value from selected values

Dear Coleagues, 

I have a table that contains different reporting periods, the period is in a report as an slicer (Fig 2), in a way that the user can see results consolidated or by period, normally its cumulative so you if you are in December , then feb, march, june and sep and dec are likely to be selected, up to here , so far so good.. easy...  the tricky part is that apart of the consolidation i need to also calculate some KPIs based on the lastest period selected,  in the  example below (Fig2) i will have to calculate some KPI in the last selected period December 2020  (i.e # of records)  making the filters is not problem, the problem is how to obtain the MAX Selected value from the items selected on the slicer? , someone will notice that i have the "Order" Column which can be used to retrive the max , que question is how to obtain the max from the list of selected items on the slicer. hope this make sense and i appreciate your help in advance, 

Cristian 

 

 

 

cg1980_0-1612352073512.png

cg1980_1-1612352315017.png

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @cg1980 ,

 

Do you want to get the maximum value of the selected value in the slicer?

If so, you can create a measure as follows.

Measure 2 = MAXX(ALLSELECTED(Sheet2[period]),[period])

v-yuaj-msft_0-1612504246003.png

Best Regards,

Yuna

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @cg1980 ,

 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.

 

Best Regards,

Yuna

Anonymous
Not applicable

Hi @cg1980 ,

 

Do you want to get the maximum value of the selected value in the slicer?

If so, you can create a measure as follows.

Measure 2 = MAXX(ALLSELECTED(Sheet2[period]),[period])

v-yuaj-msft_0-1612504246003.png

Best Regards,

Yuna

amitchandak
Super User
Super User

@cg1980 , Assume this coming from date table where you have date too or YYYYMM will work in both case.

 

You can get max month like

measure =
var _max = maxx(allselected('Date'),'Date'[Date])
return
maxx(filter('Date', 'Date'[Date] = _max), [Period, Text])

 

You can move return to var and use that in filter

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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