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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors