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

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

Reply
Anonymous
Not applicable

Date selection using MAX(Date) is not working

Hello,

 

I have created table in power BI desktop with hard coded dates which contains the last date of each year.

 

I have created measure C as C = MAX(Date). I am using this Date column as slicer.

 

I am using the selected dates all over the reports in measures. Year(C) for comparison.

 

But data is not coming up properly. When i am trying C = DATE(2018,12,31) then its working as expected but not for C(DATE). The Date format is also same.

 

Can anybody help me with this issue.

1 ACCEPTED SOLUTION

Hi @Anonymous,

 

I modify the measure based on your data to return Year(measure) value: 

 

Measure = var d=IF(ISFILTERED('Table1'[date]),SELECTEDVALUE('Table1'[date]),"No Selection")
return
IF(ISFILTERED(Table1[Date]),YEAR(d),BLANK())
 
Please check if attached pbix file meet your requirement. 

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
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

3 REPLIES 3
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

You can create a measure below to get selected value in the slicer: 

 

Measure = IF(ISFILTERED('Calendar'[date]),SELECTEDVALUE('Calendar'[date]),"No Selection")

 

q2.PNG

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-qiuyu-msft

I tried the above soplution but the data is not getting filtered when i am trying to use it in measure Year(Measure).

TableData.PNG

 

I have also attached the data i have entered in Power BI table.

Hi @Anonymous,

 

I modify the measure based on your data to return Year(measure) value: 

 

Measure = var d=IF(ISFILTERED('Table1'[date]),SELECTEDVALUE('Table1'[date]),"No Selection")
return
IF(ISFILTERED(Table1[Date]),YEAR(d),BLANK())
 
Please check if attached pbix file meet your requirement. 

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.