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
Anonymous
Not applicable

earlier or lookup value any measure column that could help

I am trying to create the column "Final Completed" as the example below.  In this example i have three projects which have four steps.  In the Final Complete column i want to pull the date the project was completed for each of the projects.  If the date is blank at the 700 milestones which is the last step.  then i don't want it to populate for that project. 

 

I have tried Final Completed= Calculate(Max(Milestone), table1[Record ID]=earlier(table1[record ID])

 

the data just repeats itself, I tried lookupvalue as well and trying to add filters as well no luck.  Any help will be greatly appreciated.

Record IDDescriptionMilestoneMilestone CompletedFinal Completed
11st Step2002/5/20202/6/2020
12nd Step4002/6/20202/6/2020
13rd Step6002/6/20202/6/2020
14th Final Step7002/6/20202/6/2020
21st Step2002/6/2020 
22nd Step4003/7/2020 
23rd Step6007/7/2020 
24th Final Step700  
31st Step2003/5/20205/23/2020
32nd Step4004/2/20205/23/2020
33rd Step6005/2/20205/23/2020
34th Final Step7005/23/20205/23/2020
1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi   @Anonymous 

Please add a FILTER Funtion your formula and add a conditional that table1[Milestone]=700

https://docs.microsoft.com/en-us/dax/filter-function-dax

 

Final Completed =
CALCULATE (
    MAX ( table1[Milestone Completed] ),
    FILTER (
        table1,
        table1[Record ID] = EARLIER ( table1[record ID] )
            && table1[Milestone] = 700
    )
)

Result:

1.JPG

 

Regards,

Lin

Community Support Team _ Lin
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

3 REPLIES 3
v-lili6-msft
Community Support
Community Support

hi   @Anonymous 

Please add a FILTER Funtion your formula and add a conditional that table1[Milestone]=700

https://docs.microsoft.com/en-us/dax/filter-function-dax

 

Final Completed =
CALCULATE (
    MAX ( table1[Milestone Completed] ),
    FILTER (
        table1,
        table1[Record ID] = EARLIER ( table1[record ID] )
            && table1[Milestone] = 700
    )
)

Result:

1.JPG

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Awesome!! thank you for quick reply everyone.  I am still trying to learn the EARLIER Function and when to use FILTER fucntion

amitchandak
Super User
Super User

Try

final calculated = maxx(FILTER(Sheet1,Sheet1[Description]="4th Final Step" && Sheet1[Record ID]=EARLIER(Sheet1[Record ID])),Sheet1[Milestone Completed])

 

Link: https://www.dropbox.com/s/m1c5minott5hf30/Milestone.pbix?dl=0

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin

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.