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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
peterh
Regular Visitor

FIRSTDATE() Issue

I have created measures using FIRSTDATE() and LASTDATE() and named them Selected Start Date and Selected End Date, respectively. I have added these values as filters to other measures. For filtering, I have added month and year slicers to filter a calendar table.

 

As an example, I have selected May 2016 in the slicers. When I add the Selected Start Date value to the page, the value shows up as 5/1/2016. When I look at measures using the Selected Start Date value, it uses 1/1/1900 as the date. Why would the value be correct on the page but incorrect in the measures using the Selected Start Date value? The Selected End Date shows up correctly in the other measures.

1 REPLY 1
v-micsh-msft
Microsoft Employee
Microsoft Employee

Hi peterh,

 

Would you please share the measure you used here? As the date 1/1/1900 ( I should say, this is a leap year, but the date function sometimes not agree with that) returned, you might hit some interesting things when using date and time functions. : ) 

FIRSTDATE () (LASTDATE () ) function would return the first date (last date) in the current context for the specified column of dates. The current context means the context which the measure calculated in.

Regarding the situation you mentioned, I suggest we check the following two parts first:

1. Check the Visual Interaction setting (Power BI desktop, when selecting Visuals, choose format tab ->Edit Interactions) between the slicer and the measure using FIRSTDATE () function;

2. Verify the measure itself, see if there are any calculated filters in this measure which would remove the Slicer filter, such as all function.

Regards

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.