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
AlexFelipe
New Member

How to get a table with lastest stage from each name based in date?

image.pngI wanna show in table only the lastest stage from each name based in date.

I tried use MAXX function but i failed.

How can i make it? Thanks everyone

1 ACCEPTED SOLUTION
themistoklis
Community Champion
Community Champion

@AlexFelipe 

 

Please create a new measure and add the following formula:

MaxStage = CALCULATE(MAX(Sheet1[Stage]),FILTER(Sheet1,Sheet1[Date]=MAX(Sheet1[Date])))

 

PowerBI workspace attached

 

View solution in original post

4 REPLIES 4
tamerj1
Super User
Super User

Hi @AlexFelipe 

is the Date column form the same table or from a date table?

From the same table

themistoklis
Community Champion
Community Champion

@AlexFelipe 

 

Please create a new measure and add the following formula:

MaxStage = CALCULATE(MAX(Sheet1[Stage]),FILTER(Sheet1,Sheet1[Date]=MAX(Sheet1[Date])))

 

PowerBI workspace attached

 

Works! Thank you so much!!

I'll just leave the code here for everyone:

 

MaxDate = CALCULATE(MAX(Sheet1[Date]),FILTER(Sheet1,Sheet1[Date]=MAX(Sheet1[Date])))
MaxStage = CALCULATE(MAX(Sheet1[Stage]),FILTER(Sheet1,Sheet1[Date]=MAX(Sheet1[Date])))

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.