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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
vanguard2x2
New Member

Get multiple ID columns into one column in a matrix

Greetings everyone, 

I want to combine multiple (two) columns that have parent/child relationship into one column when drilling down in a matrix. Let me give an example - the matrix looks like this now:

Screenshot 2022-09-08 231026.png

So I want a column name "ID" combined of the other two columns (Program ID and Phase ID) with the following conditions:

- For program it only shows the program ID

- When drilling down to the phases it shows the phase IDs

- and for the manager name it should show a blank value because there is no ID for it

------

So the result should look like this:

Screenshot 2022-09-08 231026-result.png

The data is comming from two tables: Programs and Phases;

There is a "one-to-many" relationship between the two tables (Program > Phase)

 

I appreciate any help regarding this issue and thanks in advance! 

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

You could try

Combined ID =
IF (
    ISINSCOPE ( 'Phase'[Name] ),
    SELECTEDVALUE ( 'Phase'[Phase ID] ),
    IF ( ISINSCOPE ( 'Program'[Name] ), SELECTEDVALUE ( 'Program'[Program ID] ) )
)

View solution in original post

2 REPLIES 2
vanguard2x2
New Member

That worked!! Thanks so much!

johnt75
Super User
Super User

You could try

Combined ID =
IF (
    ISINSCOPE ( 'Phase'[Name] ),
    SELECTEDVALUE ( 'Phase'[Phase ID] ),
    IF ( ISINSCOPE ( 'Program'[Name] ), SELECTEDVALUE ( 'Program'[Program ID] ) )
)

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.