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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
Thumper369
Frequent Visitor

Need help with List of most recent record update filtered by date and sprint where most recent

Hello Smart Friends.  I need help.  I have spent much time over the last few weeks trying to solve.

 

Situation.

I have a table of data that includes a row of data for every time a story is updated.  I am extracting a list of stories filtered to a given date. So, my intent is to exclude from the page any updates past this date. 

  • I want to know a list of stories that were assigned to a given sprint at of a date.
  • Every story does not have a record on that given date since it may have been assigned to that sprint prior and its “current” assignment is already set.
    • Given that I have to look backward at all history but exclude anything after the given date in case it was updated later
  • I want a list where every ID is represented only once.  So, I would like to include only the last updated record biased on revised date. 

    Here is an example of the data I have.  (Remember some of these ID’s have additional row entries pos the filtered 6/26 date)

 

What I need is a list Filtered fist by Sprint # then by date where the System ID is unique and showing the latest record constrained by the date filter. 

System_IdSystem_TitleSprintIterationNameSystem_RevisedDate
89042Title for story 1 Revision 1Sprint 31Sprint 31 Monkey Fist6/25/2020 5:44
89042Title for story 1 Revision 1Sprint 31Sprint 31 Monkey Fist6/25/2020 5:46
89042Title for story 1 Revision 1Sprint 31Sprint 31 Monkey Fist6/25/2020 5:46
89042Title for story 1 Revision 1Sprint 31Sprint 31 Monkey Fist6/25/2020 6:25
89042Title for story 1 Revision 1Sprint 31Sprint 31 Monkey Fist6/25/2020 7:32
89042Title for story 1 Revision 1Sprint 31Sprint 31 Monkey Fist6/26/2020 5:35
91986Title for story 2 Revision 1Sprint 31Sprint 31 Monkey Fist6/25/2020 13:29
91986Title for story 2 Revision 1Sprint 31Sprint 31 Monkey Fist6/26/2020 7:43
92890Title for story 3 Revision 1Sprint 31Sprint 31 Monkey Fist6/24/2020 10:59
92890Title for story 3 Revision 1Sprint 31Sprint 31 Monkey Fist6/26/2020 7:51
92890Title for story 3 Revision 2Sprint 31Sprint 31 Monkey Fist6/11/2020 9:20
92890Title for story 3 Revision 2Sprint 31Sprint 31 Monkey Fist6/11/2020 10:26
92890Title for story 3 Revision 2Sprint 31Sprint 31 Monkey Fist6/16/2020 10:39
92890Title for story 3 Revision 2Sprint 31Sprint 31 Monkey Fist6/16/2020 10:43
92890Title for story 3 Revision 2Sprint 31Sprint 31 Monkey Fist6/24/2020 8:52
92890Title for story 3 Revision 2Sprint 31Sprint 31 Monkey Fist6/24/2020 9:25
92890Title for story 3 Revision 2Sprint 31Sprint 31 Monkey Fist6/24/2020 10:58
92890Title for story 3 Revision 2Sprint 31Sprint 31 Monkey Fist6/24/2020 10:59
92890Title for story 3 Revision 2Sprint 31Sprint 31 Monkey Fist6/24/2020 10:59
93066Title for story 4 Revision 1Sprint 31Sprint 31 Vader's Taters6/24/2020 11:35
93066Title for story 4 Revision 1Sprint 31Sprint 31 Vader's Taters6/24/2020 14:56
93066Title for story 4 Revision 1Sprint 31Sprint 31 Vader's Taters6/24/2020 20:29
93066Title for story 4 Revision 1Sprint 31Sprint 31 Vader's Taters6/25/2020 8:13
93066Title for story 4 Revision 1Sprint 31Sprint 31 Vader's Taters6/25/2020 11:30
93066Title for story 4 Revision 1Sprint 31Sprint 31 Vader's Taters6/26/2020 17:20
93067Title for story 5 Revision 1Sprint 31Sprint 31 Vader's Taters6/24/2020 11:34
93067Title for story 5 Revision 1Sprint 31Sprint 31 Vader's Taters6/24/2020 20:33
93067Title for story 5 Revision 1Sprint 31Sprint 31 Vader's Taters6/24/2020 21:11
93067Title for story 5 Revision 1Sprint 31Sprint 31 Vader's Taters6/24/2020 21:14
93067Title for story 5 Revision 1Sprint 31Sprint 31 Vader's Taters6/24/2020 21:14
93067Title for story 5 Revision 1Sprint 31Sprint 31 Vader's Taters6/25/2020 7:29
93067Title for story 5 Revision 1Sprint 31Sprint 31 Vader's Taters6/25/2020 11:41
93067Title for story 5 Revision 1Sprint 31Sprint 31 Vader's Taters6/26/2020 17:20


 

5 REPLIES 5
v-alq-msft
Community Support
Community Support

Hi, @Thumper369 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

 

Table:

f1.png

 

Test(a calculated table):

Test = DISTINCT('Table'[System_RevisedDate])

 

You may create a measure as below.

Visual Control = 
var _date = 
CALCULATE(
    MAX('Table'[System_RevisedDate]),
    FILTER(
        ALLSELECTED('Table'),
        'Table'[System_Id] = SELECTEDVALUE('Table'[System_Id])&&
        'Table'[System_RevisedDate]<=SELECTEDVALUE('Test'[System_RevisedDate])
    )
)
return
IF(
    SELECTEDVALUE('Table'[System_RevisedDate])=_date,
    1,0
)

 

Finally you may put the measure in the visual level filter and use the date column from 'Test' table to filter the result.

f3.png

 

Best Regards

Allan

 

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

 

 

@v-alq-msft  it looks like in  your example shot it shows story 3 twice revision 2 and 3. That is part of the problem I am having.  I want to only see each instacne of ID once.  so in your example I would only want revision 3  

Restating the desired result

 

End result should be a list  of uniquie System_Id (utilizing most recent as defined by System refined date) where filtered by sprint number and <= filtered system date (as to exclude later updates).  

 

Ok, I could still use a solution to this as I will have other things I need that are similar.  


But for me all I needed was setting the change date column to latest and getting rid of the sprint column as power BI was seeing them as two entries that needed to be displayed as one record had one value in it and another had a diferent teams value.  

so it was showing me both records but I did not need that.  I only neede the latest one.  

amitchandak
Super User
Super User

@Thumper369 , Not all requirements are clear to me.

Refer if this can help in getting the last record

LASTNONBLANKVALUE(Table[System_RevisedDate], Count(Table[System_Id]))

or

Sumx(summarize(Table,Table[Sprint],Table[System_Id],"_1",LASTNONBLANKVALUE(Table[System_RevisedDate], Count(Table[System_Id]))),[_1])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.