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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
novicenovice
Helper I
Helper I

Max Date with 1 to x FILTER(s)

Dear all,

 

I need to get the max [DATE_TODAY] on table (B) with specific conditions (Table_A[S_ORDER] = Table_B[S_ORDER} and I got the max date of the full table B.

 

Someone can help me ? thanks 🙂

 

Table A

 

S_ORDERTEST1Details
530803422/11/2017=MAXX(FILTER(TABLE_B;TABLE_A[S_ORDER]=TABLE_B[S_ORDER]);TABLE_B[DATE_TODAY])


Table B

DATE_TODAYS_ORDER
13/11/20175308034
14/11/20175308034
15/11/20175308034
16/11/20175308034
17/11/20175308034

 

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

 

Try this calculated column formula in Table A

 

=CALCULATE(MAX(Table_B[Date_Today]),FILTER(Table_B,Table_B[S_Order]=EARLIER(Table_A[S_Order])))

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

 

Try this calculated column formula in Table A

 

=CALCULATE(MAX(Table_B[Date_Today]),FILTER(Table_B,Table_B[S_Order]=EARLIER(Table_A[S_Order])))

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks Ashish, your proposal works perfectly.

 

&Thanks also to PXG08680 for your help but I still got result as error.

 

 

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
pxg08680
Resolver III
Resolver III

@novicenovice

a1.PNG

Make a column in Table2 as above. Left one is Table1 data and right is Table2 data with extra column of your req.

You can do the same in Table1 also if you want to.

 

Regards,

PXG08680

parry2k
Super User
Super User

i assume table a is related to table b on s_order

 

in table a, add following measure

 

Max Date = MAX(Tableb[Date_Today])

Dop S_Order and Max Date (new measure) in table visual and see if you get the result.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.