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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
LP2803
Responsive Resident
Responsive Resident

default to latest cycle name in slicer based on max date from Cycle start date column

Hi Team,

 

I have been trying to figureout to set a default value in a slicer to the latest cycle name based on the max date from another column which has date in it.

 

I have Cycle_name, termid, cycle_start_date in the dataset as shown below.

cycle_nametermidcycle_start_Date
cycle112433301-01-21
cycle212312302-01-21
cycle314242103-01-21
cycle414242104-01-21

when user opens up the report in powerbi services, he should be able to see the latest cycle name being selected in the Cycle_name slicer. 

In the above data,  04-01-21 is the latest date and "cycle4" needs to be the default value selected.

 

I already tried the below calculated column, but doenst work. the selection made while publishing the report will remain in the selection instead a dynamic value
Latestycle = if('table'[cycle_start_Date]=max('table'[cycle_start_date]),concatenate('table'[cycle_name],"- Latest",'table'[cycle_name])

Kindly guide me whats missing here and what should i change to make it work.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@LP2803 , You need to use a static text like latest to make sure it changes in SLICER. Means you can save in slicer

 

Latestycle = if('table'[cycle_start_Date]=max('table'[cycle_start_date]),"Latest cycle",'table'[cycle_name])

 

to display name in title or card , you can use a measure


meausre =
var _max = maxx(all('table') ,[cycle_start_date])
return
calculate(max('table'[cycle_name]), filter('table', [cycle_start_date] =_max))

 

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

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@LP2803 , You need to use a static text like latest to make sure it changes in SLICER. Means you can save in slicer

 

Latestycle = if('table'[cycle_start_Date]=max('table'[cycle_start_date]),"Latest cycle",'table'[cycle_name])

 

to display name in title or card , you can use a measure


meausre =
var _max = maxx(all('table') ,[cycle_start_date])
return
calculate(max('table'[cycle_name]), filter('table', [cycle_start_date] =_max))

 

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

@amitchandak  a follow up question. in the measure provided above, how to show multiple values selected with "," added

@amitchandak thanks amit. No other possible way to show the cycle name itself along with "Latest Cycle" text in the slicer value?

and also, can I provide multi value selection option to user? 

@LP2803 , Slicer does not support function or measure as of now for the default value. There are a few Ideas around it.  https://ideas.powerbi.com/ideas/

 

But as of now that is the option

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

@LP2803 , Slicer does not support function or measure as of now for the default value. There are a few Ideas around it.  https://ideas.powerbi.com/ideas/

 

But as of now that is the option

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors