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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Elmarius123
Regular Visitor

Closest actual date

I have a Table 1. 

This a table with consisting of  dates when limits changed and actual limits.

 

I also have a slicer with dates.

 

I want - when i select a date in the slicer, it would show me the actual limit from table 1. if the dates do not match, it needs to show me the last actual dates limit before the date in the slicer.. 

Screenshot_2022-04-04-14-24-55-137_com.miui.gallery.jpg

Screenshot_2022-04-04-14-24-53-032_com.miui.gallery.jpg

2 REPLIES 2
amitchandak
Super User
Super User

@Elmarius123 , You an get a date like

measure =
var _max = maxx(allselected(Date),Date[Date])
var _min = mainx(allselected(Date),Date[Date])
return
calculate(Max(Table[Date]), filter(Table, Table[Date] >= _min && Table[Date] >= _max))

 

or you use this max date to calculate other thing

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

Spoiler
Hi, amitchandak. Actually, i am making a Gauge visual. In this visual, i have a Target value.. this target value should change regarding of month, say in october Target value was 45%, only in December it is changed to 65%. When i select November, there should be shown acting Limit, which is 45%(October)

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.