Showing results for 
Search instead for 
Did you mean: 
Helper III
Helper III

Check if table visual has any column from specific table



I have a table visual that is showing column fields coming from two tables (A and B) having as relationship:

- One two many

- Both filtering Direction

- Not all data from both tables are having link together 


In such configuration, let's say I have fields from table A in my visual table as columns, If I add new fields coming from Table B, it will filter down the displayed data to only intersection data existing in A and B, which is fine.

Thus, the amount of rows being displayed in my table visuals is depending on the columns being added to my visual table fields.


My question now is how to calculate this amount of rows in a measure?


I am missing a triger with an if condition to know if columns from one of the tables had been added to the table visual or not.


ISFILTERED is not working as adding a field value to a table is actually not a direct filter and ISCROSSFILTERED is always TRUE as both tables have cross filtering relationship.


I would need a way to check if field or table is added to visual or something that can replicate the filtering behaviour that is happening when the table visual is filtering the displayed rows when columns from both tables are added together.






Community Support
Community Support

Hi @Marco57 

If you want to count rows that table a in table b, try to build measures.

Here I build a sample.

Table A


Table B:


Relationship is one to many.

A IN B = 
CALCULATE(COUNTROWS('Table A'),FILTER('Table A','Table A'[Cagetory] IN VALUES('Table B'[Category])))
B IN A = 
CALCULATE(COUNTROWS('Table B'),FILTER('Table B','Table B'[Category] IN VALUES('Table A'[Cagetory])))

Result is as  below.


Best Regards,

Rico Zhou


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


Super User
Super User

@Marco57 , Are you looking for base data here - "My question now is how to calculate this amount of rows in a measure?"


In that case, you need to create a drill-through report will all row-level columns. Or add index column in Table B and use that in visual


Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.