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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
ksivaganesh99
Helper II
Helper II

Display data in a table visual using two linked tables

 

Hi all,

I have two tables linked by a linkedID. Below are the two tables.

Table1:

IDStatusTypeStateSuggestionOwnerLinkedID
123NewHighHighAvoidThomas Edison1
124NewHighHighAvoidMonique Cook2
124NewHighHighAvoidMonique Cook3
124NewHighHighAvoidMonique Cook4

Tale 2:

LinkedIDTitleStatus
1WorkItem1Done
2WorkItem2Done
3WorkItem3Done
4WorkItem4Done

 

I want to have them displayed in a tabular format as shown below. How can I acheive it?Annotation 2020-05-03 162838.png

 

Any help is highly appreciated. Thanks.

1 ACCEPTED SOLUTION

Hi @ksivaganesh99 ,

 

How about this:

 

1. Create a [State Measure] like so:

State Measure =
VAR Previous_ =
    CALCULATE (
        MAX ( Table1[State] ),
        FILTER ( ALLSELECTED ( Table2 ), Table2[Title] < MAX ( Table2[Title] ) )
    )
RETURN
    IF ( Previous_ = MAX ( Table1[State] ), BLANK (), MAX ( Table1[State] ) )

 

2. Change [Measure] like so:

Measure = 
SWITCH (
    [State Measure],
    "High", "red",
    "Medium", "orange",
    "Low", "blue"
)

 

3. Replace [State] column with [State Measure] in the Matrix visual.

 

4. Set conditional formatting.

 

cond.PNG

state.PNG

 

BTW, .pbix file attached.

 

 

Best Regards,

Icey

 

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

7 REPLIES 7
Icey
Community Support
Community Support

Hi @ksivaganesh99 ,

 

Is this what you want?

row.PNG

If it is, create a Matrix visual like so:

row1.PNG

row2.PNG

 

 

Best Regards,

Icey

 

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

Hi @Icey ,

 

Thank you so much for the reply. I want background colors of State column to be changed based on their values. Is it possible with your solution?

 

Thank you again for the help.

Hi @ksivaganesh99 ,

 

In Matrix visual, if the columns are in "Rows" or "Columns" fields, Power BI is not support to apply conditional formatting on them. It is suggested to put the columns you want to apply conditional formatting to "Values" field.

state.PNG

Measure =
SWITCH (
    MAX ( Table1[State] ),
    "High", "red",
    "Medium", "orange",
    "Low", "blue"
)

 

 

Best Regards,

Icey

 

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

Hi @Icey 

 

Thanks for the reply. I appreciate your approach but I don't want the "State" to be repeated for all the linked items when I put it in "Values" section. Is there a way we can acheive it?

I want something like this (edited in paint😀)

Cropped.png

 

Any help is highly appreciated.

Hi @ksivaganesh99 ,

 

How about this:

 

1. Create a [State Measure] like so:

State Measure =
VAR Previous_ =
    CALCULATE (
        MAX ( Table1[State] ),
        FILTER ( ALLSELECTED ( Table2 ), Table2[Title] < MAX ( Table2[Title] ) )
    )
RETURN
    IF ( Previous_ = MAX ( Table1[State] ), BLANK (), MAX ( Table1[State] ) )

 

2. Change [Measure] like so:

Measure = 
SWITCH (
    [State Measure],
    "High", "red",
    "Medium", "orange",
    "Low", "blue"
)

 

3. Replace [State] column with [State Measure] in the Matrix visual.

 

4. Set conditional formatting.

 

cond.PNG

state.PNG

 

BTW, .pbix file attached.

 

 

Best Regards,

Icey

 

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

Greg_Deckler
Super User
Super User

I'm not sure I understand what you want. Sounds like you need a matrix visualization but after that, I can't tell if I am looking at source data, current output, expected output or ? Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thank you for the reply. I updated the question with required details. Any help is very much appreciated.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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