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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
PC2022
Helper III
Helper III

Matrix/Table

I have comments associated with each project in my datasource which are displayed at the bottom of the visual. In my matrix visual i have a list of PMs/Projects on the left side and even if a project is not selected, the comments on the bottom are displayed. How do i make that table show no comments, unless a project is selected?

PC2022_0-1731598499488.png

 

1 ACCEPTED SOLUTION
Bibiano_Geraldo
Super User
Super User

Hi @PC2022 ,

Create a measure that checks if a project is selected. You can use the HASONEVALUE function for this purpose.

ShowComments = IF(HASONEVALUE('Projects'[ProjectID]), 1, 0)

 

Add this measure to the visual-level filters of your comments table and set the filter to show only when the measure equals 1

You can learn more about HASONEVALUE function here 

If this help you, please consider to accept as solution and give a Kudo.

 

Thank you

View solution in original post

2 REPLIES 2
Bibiano_Geraldo
Super User
Super User

Hi @PC2022 ,

Create a measure that checks if a project is selected. You can use the HASONEVALUE function for this purpose.

ShowComments = IF(HASONEVALUE('Projects'[ProjectID]), 1, 0)

 

Add this measure to the visual-level filters of your comments table and set the filter to show only when the measure equals 1

You can learn more about HASONEVALUE function here 

If this help you, please consider to accept as solution and give a Kudo.

 

Thank you

johnt75
Super User
Super User

You could create a measure like

Show Comments = IF( HASONEVALUE( 'Table'[Project ID] ), 1 )

then use that as a filter on the comments visual, to only show when the value is 1.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.