cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Querying for "Owner Portfolio" correctly

BenAvdicevic
Honored Contributor

Hi,

I am trying to write some queries where I check if  name of the Portfolio owner for an initiave matches some string.

Something like this:

SELECT [Initiative]  WHERE  [Owner Portfolio] LIKE "#Portfolio Name#"

However -  "Owner Portfolio"  is an unusual concept.    It is not just direct owner of the initiative.   It also includes Portfolios which are parents of the direct owner of the initiative.

For example

  • Root Portfolio
    • Sub Portfolio 1
      • Sub Portfolio 2
        • Initiative "ABC"


In this example,   what I'm finding when using Advanced Search is that "Owner Portfolio" of Initiative ABC is actually  all of the above portfolios (Sub Portfolio 2, Sub Portfolio 1 and Root Portfolio)

Question

  • Is there a way to query just the "direct owner" of the initiative?   For example,   Just return the "Sub Portfolio 2" ?

@PBessodes would appreciate any suggestions.

3 Replies

Yes, you are right : it has to do with full name of portfolio. Here is an example:

PBessodes_0-1754409271633.png

And the export of portfolio names and short names:

PBessodes_1-1754409307329.png

So you should use short name instead of name:

Select Application where [Initiative].[Owner Portfolio].[Short Name] "#XXXX#" or use = as you suggested

@PBessodes Thanks for quick reply.

Maybe I am seeing this behavior because we use 6.0 and not 6.1.

See these screenshots - which clearly show the behavior I'm describing.

Again, I'd appreciate any insights.

BenAvdicevic_0-1754408256874.png

The Portfolio "TD N.E.W. Platforms" is just a "root" Portfolio. It doesn't own initiatives directly.   It own approximately 20 sub-Portfolios - which directly own initiatives.

But - as you can see - the query  "WHERE [Initiative].[Owner Portfolio] LIKE "#N.E.W#"  returns 6000+ results.

Could it have something to do with using LIKE comparison and the "full name" including the upper-Portfolio in the name?    

Maybe using "=" comparison would be better ?

PBessodes
MEGA
MEGA

Hi,
Your query should return what you were expecting. The only reason it would return the whole portfolio hierarchy would be that all portfolio names contain the characters you submitted in the query parameter and they all have initiatives. I just checked it on a standard 6.1 version and it is OK.
Can you share your current version ?
If you wanted to have the hierarchy, you would use the "deeply" option in your ERQL query.