cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Deevo_
Helper II
Helper II

Custom Column to retrieve the very first iteration of a Project name

Hi All,

Thanks in advance for your time.

What I am trying to do:

  • I have a project which has gone through multiple name changes, but i need to retrieve the very first name that the project was given.
  • I have tried to use MIN to calculate the earliest ID number, and then output the Project Name that is related to that ID number, but I am unable to repurpose other similar scenarios on this forum.

Sample Data:

IDProject Name
001Cloud enhancements
002Cloud enhancements version 2
003

Cloud enhancements version 3

 

Expected result:

When i display the result in a table, I expect to see the project name "Cloud enhancements". This is the original name of the project.

 

thank you.

1 ACCEPTED SOLUTION
Mahesh0016
Solution Sage
Solution Sage

@Deevo_ I hope this hepls you!THANK YOU!!

 

ProjectName =
MAXX (
    FILTER (
        'Table (2)',
        'Table (2)'[ID] = 001
            && CONTAINSSTRING ( EARLIER ( 'Table (2)'[Project Name] ), 'Table (2)'[Project Name] )
    ),
  'Table (2)'[Project Name]
)
Mahesh0016_0-1686206762952.png

 

View solution in original post

3 REPLIES 3
Deevo_
Helper II
Helper II

Thank you so much, this worked a treat. I modified your DAX slightly to pick the Earliest ID number instead of manually typing it in as I have multiple different projects.

I replaced "  'Table (2)'[ID] = 001 " with "MIN([ID])".

You have made my day !!!! Thanks once again

Mahesh0016
Solution Sage
Solution Sage

@Deevo_ I hope this hepls you!THANK YOU!!

 

ProjectName =
MAXX (
    FILTER (
        'Table (2)',
        'Table (2)'[ID] = 001
            && CONTAINSSTRING ( EARLIER ( 'Table (2)'[Project Name] ), 'Table (2)'[Project Name] )
    ),
  'Table (2)'[Project Name]
)
Mahesh0016_0-1686206762952.png

 

Hi Mahesh0016,

I have come to realise that replacing 'Table (2)'[ID] = 001 " with "MIN([ID])" does not work. I believe its because I have not specified in the DAX how to group the projects together. The piece of data missing from my Example is the "Project Code (Level 1 & ChangeID)" and the "Project Code Level 1".

The updated Sample date looks like this:

Sample Data:

Project Code (Level 1 & ChangeID)Project Code Level 1ChangeIDProject NameExpected Result
P-1234-001P-1234001Cloud enhancementsCloud enhancements
P-1234-002P-1234002Cloud enhancements version 2Cloud enhancements
P-1234-003P-1234003

Cloud enhancements version 3

Cloud enhancements

P-4321-001

P-4321001Node Upgrade

Node Upgrade

P-4321-002P-4321002Node Upgrade version 2

Node Upgrade

P-4321-003P-4321003

Node Upgrade version 3

Node Upgrade

Question:

Can you please help me to revise your DAX solution to Group by the "Project Code level 1" and then choose the "Project Name" of the earliest "ChangeID"?

 

Expected result:

  1. P-1234 Project Name = Cloud Enhancements
  2. P-4321 Project Name = Node Upgrade

Many thanks

 

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors