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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
malpani
Helper I
Helper I

New custom column to get the latest status of release lifecycle by comparing rows in the database

Hi, 

 

In my datasource (JIRA), I am getting data in following format. 

This datasource shows release data which goes through milestones from P1 to P10 and status of each milestone.

 

Unique KeyProduct NameRelease NameMilestoneStatus
Key1Product A24.xP1Approved
Key2Product A24.xP2Approved
Key3Product A24.xP3Approved
Key4Product A24.xP4Approved
Key5Product A24.xP5Approved
Key6Product A24.xP6Approved
Key7Product A24.xP7Approved
Key8Product A24.xP8Planned
Key9Product A24.xP9Planned
Key10Product A24.xP10Planned
Key11Product B24.xP1Approved
Key12Product B24.xP2Approved
Key13Product B24.xP3Approved
Key14Product B24.xP4Planned
Key15Product B24.xP5Planned
Key16Product B24.xP6Planned
Key17Product B24.xP7Planned
Key18Product B24.xP8Planned
Key19Product B24.xP9Planned
Key20Product B25.xP10Planned

 

I would like to get an additional column to get the latest lifecycle status of release meaning which latest milestone is Approved. 


Unique KeyProduct NameRelease NameMilestoneStatusLifecycle Status
Key1Product A24.xP1ApprovedP5 Approved
Key2Product A24.xP2ApprovedP5 Approved
Key3Product A24.xP3ApprovedP5 Approved
Key4Product A24.xP4ApprovedP5 Approved
Key5Product A24.xP5ApprovedP5 Approved
Key6Product A24.xP6ApprovedP5 Approved
Key7Product A24.xP7ApprovedP5 Approved
Key8Product A24.xP8PlannedP5 Approved
Key9Product A24.xP9PlannedP5 Approved
Key10Product A24.xP10PlannedP5 Approved
Key11Product B24.xP1ApprovedP3 Approved
Key12Product B24.xP2ApprovedP3 Approved
Key13Product B24.xP3ApprovedP3 Approved
Key14Product B24.xP4PlannedP3 Approved
Key15Product B24.xP5PlannedP3 Approved
Key16Product B24.xP6PlannedP3 Approved
Key17Product B24.xP7PlannedP3 Approved
Key18Product B24.xP8PlannedP3 Approved
Key19Product B24.xP9PlannedP3 Approved
Key20Product B25.xP10PlannedP3 Approved

 

 

 

1 ACCEPTED SOLUTION
v-kongfanf-msft
Community Support
Community Support

Thanks for the reply from @amitchandak , please allow me to provide another insight:

 

Hi @malpani ,

 

You can try formula like below:

Lifecycle Status =
VAR CurrentProduct = Releases[Product Name]
VAR CurrentRelease = Releases[Release Name]
VAR LatestApprovedMilestone =
    CALCULATE (
        MAX ( Releases[Milestone] ),
        FILTER (
            Releases,
            Releases[Product Name] = CurrentProduct
                && Releases[Release Name] = CurrentRelease
                && Releases[Status] = "Approved"
        )
    )
RETURN
    IF (
        ISBLANK ( LatestApprovedMilestone ),
        BLANK (),
        LatestApprovedMilestone & " Approved"
    )

vkongfanfmsft_0-1717124442414.png

Best Regards,
Adamk Kong

 

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
Ashish_Mathur
Super User
Super User

Hi,

The answer should be P7 (not P5) for Product A.  This calculated column formula works

Column = CALCULATE(MAX(Data[Milestone]),FILTER(Data,Data[Product Name]=EARLIER(Data[Product Name])&&Data[Status]="Approved"))

 

Ashish_Mathur_0-1717124949289.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-kongfanf-msft
Community Support
Community Support

Thanks for the reply from @amitchandak , please allow me to provide another insight:

 

Hi @malpani ,

 

You can try formula like below:

Lifecycle Status =
VAR CurrentProduct = Releases[Product Name]
VAR CurrentRelease = Releases[Release Name]
VAR LatestApprovedMilestone =
    CALCULATE (
        MAX ( Releases[Milestone] ),
        FILTER (
            Releases,
            Releases[Product Name] = CurrentProduct
                && Releases[Release Name] = CurrentRelease
                && Releases[Status] = "Approved"
        )
    )
RETURN
    IF (
        ISBLANK ( LatestApprovedMilestone ),
        BLANK (),
        LatestApprovedMilestone & " Approved"
    )

vkongfanfmsft_0-1717124442414.png

Best Regards,
Adamk Kong

 

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

amitchandak
Super User
Super User

@malpani , Create a new column

 

Stage = right([Milestone], Len([Milestone]) -1)

 

Then create a measure

final status =

var _max = maxx(filter(Table, [Product Name] = earlier([Product Name]) ), [Stage])

return

maxx(filter(Table, [Product Name] = earlier([Product Name]) && [Stage] =_max) , [Status])

 

Power BI DAX- Earlier, I should have known Earlier: https://youtu.be/CVW6YwvHHi8

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

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.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.