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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Anonymous
Not applicable

Maximum Date

 

22.PNG

 

 

Dear Friends i need a small help

How to write a DAX

Start date : 7/10/2019 (MMDDYY)

End Date : 8/6/2019 (MMDDYY)

i need a minimum Date of end date output : 8/1/2019

i want to calculate difference dates b/W 8/6/2019  minmum of end date i.e 8/1/2019 

 

DATEDIFF(minmum of end date i.e 8/1/2019, end date i.e 8/6/2019, day)

 

 

Thanks

Godasu

2 ACCEPTED SOLUTIONS
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You may try to create measures like DAX below.

 

DateDiff= DAY(LASTDATE(Table1[Date]))-1

 

Best Regards,

Amy

 

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

saykasku
Resolver I
Resolver I

Hi,

I think You need this:

DayDiff = 
var _maxDate = MAX(time[dates])
RETURN
DATEDIFF(
    DATE(YEAR(_maxDate);MONTH(_maxDate);1);
    MAX(time[dates]);
    DAY
)

Przechwytywanie.PNG

 

View solution in original post

4 REPLIES 4
v-xicai
Community Support
Community Support

Hi @Anonymous  ,

 

Does that make sense? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.

 

Best regards

Amy

saykasku
Resolver I
Resolver I

Hi,

I think You need this:

DayDiff = 
var _maxDate = MAX(time[dates])
RETURN
DATEDIFF(
    DATE(YEAR(_maxDate);MONTH(_maxDate);1);
    MAX(time[dates]);
    DAY
)

Przechwytywanie.PNG

 

v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You may try to create measures like DAX below.

 

DateDiff= DAY(LASTDATE(Table1[Date]))-1

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi @Anonymous ,

 

The requirement is not clear.

 

Can you upload sampledata,pbix and output expected to Google/OneDrive and share the link here to find the right solution.

 

Cheers

 

CheenuSing

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.