cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

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

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Maximum Date

Hi @godasu ,

 

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

Highlighted
Resolver I
Resolver I

Re: Maximum Date

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
Highlighted
Super User I
Super User I

Re: Maximum Date

Hi @godasu ,

 

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

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!
Highlighted
Community Support
Community Support

Re: Maximum Date

Hi @godasu ,

 

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

Highlighted
Resolver I
Resolver I

Re: Maximum Date

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

Highlighted
Community Support
Community Support

Re: Maximum Date

Hi @godasu  ,

 

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

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors