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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

How to return a specific field for a record

Hi, I have connected PowerBI to Microsoft Project Online and have a question on how to return the relevant project and programme manager for a project.

All projects, programmes and portfolios are contained in the projects table. Each row is a project, programme or portfolio. Each row has a 'type' field that identifies which of these the row is. Each row also has a 'manager' field, a 'programme' field that identifies what programme the row belongs to and a  'portfolio' field that identifies what portfolio the row beleongs to. So an example table would be:

PortfolioProgrammeProjectTypeManager
Mars Colonisation PortfolioSpaceship programmeWooden MustardProjectBrent Bell
Mars Colonisation PortfolioSpaceship programmeIron SpanielProjectBrent Bell
Mars Colonisation PortfolioSpaceship programmeSpaceship programmeProgrammeDarren Marsh
Mars Colonisation PortfolioNOT PART OF A PROGRAMMEMars Colonisation ortfolioPortfolioJulius Floyd
Mars Colonisation PortfolioEstablish base programmeGray TitaniumProject

Jobe Ray

Mars Colonisation PortfolioEstablish base programmePlatinum BeagleProjectJobe Ray
Mars Colonisation PortfolioEstablish base programmeEstablish base programmeProgramme

Lorenzo Colley

 

I wish to return the relevant programme and portfolio manager for each record, as follows. How would i do this?

Unfortunately I cannot separate the projects, programmes and portfolios into separate tables as the data strcuture is managed by Microsoft Project Online...

 

PortfolioProgrammeProjectTypeManagerPROGRAMME MGRPORTFOLIO MGR
Mars Colonisation PortfolioSpaceship programmeWooden MustardProjectBrent BellDarren MarshJulius Floyd
Mars Colonisation PortfolioSpaceship programmeIron SpanielProjectBrent BellDarren MarshJulius Floyd
Mars Colonisation PortfolioSpaceship programmeSpaceship programmeProgrammeDarren MarshDarren MarshJulius Floyd
Mars Colonisation PortfolioNOT PART OF A PROGRAMMEMars Colonisation ortfolioPortfolioJulius FloydJulius Floyd
Mars Colonisation PortfolioEstablish base programmeGray TitaniumProject

Jobe Ray

Lorenzo Colley

Julius Floyd
Mars Colonisation PortfolioEstablish base programmePlatinum BeagleProjectJobe RayLorenzo ColleyJulius Floyd
Mars Colonisation PortfolioEstablish base programmeEstablish base programmeProgramme

Lorenzo Colley

Lorenzo ColleyJulius Floyd
1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi  @Anonymous 

Create two column as below:

PROGRAMME MGR = CALCULATE(MAX('Table'[Manager]),FILTER('Table','Table'[Portfolio]=EARLIER('Table'[Portfolio])&&'Table'[Programme]=EARLIER('Table'[Programme])&&'Table'[Type]="Programme"))
PORTFOLIO MGR = CALCULATE(MAX('Table'[Manager]),FILTER('Table','Table'[Portfolio]=EARLIER('Table'[Portfolio])&&'Table'[Type]="Portfolio"))

Result:

1.JPG

 

and here is sample pbix file, please try it.

 

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

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi  @Anonymous 

Create two column as below:

PROGRAMME MGR = CALCULATE(MAX('Table'[Manager]),FILTER('Table','Table'[Portfolio]=EARLIER('Table'[Portfolio])&&'Table'[Programme]=EARLIER('Table'[Programme])&&'Table'[Type]="Programme"))
PORTFOLIO MGR = CALCULATE(MAX('Table'[Manager]),FILTER('Table','Table'[Portfolio]=EARLIER('Table'[Portfolio])&&'Table'[Type]="Portfolio"))

Result:

1.JPG

 

and here is sample pbix file, please try it.

 

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.
manikumar34
Solution Sage
Solution Sage

@Anonymous , 

 

You can create a conditional column on Power query to do so. 

#"Added Conditional Column" = Table.AddColumn(#"Changed Type1", "Custom", each if [Type] = "Portfolio" then [Manager] else null),
#"Renamed Columns" = Table.RenameColumns(#"Added Conditional Column",{{"Custom", "Portfoli MGR"}}),
#"Added Conditional Column1" = Table.AddColumn(#"Renamed Columns", "Custom", each if [Type] = "Programme" then [Manager] else null),
#"Renamed Columns1" = Table.RenameColumns(#"Added Conditional Column1",{{"Custom", "Programme MGR"}})

 

manikumar34_0-1602583059482.png

 

If you want to fill the oother rows which are empty, on else part you can mention the Value to be filled. 

 

Regards, 

Manikumar





If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.