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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Marco57
Helper III
Helper III

Check if table visual has any column from specific table

Hello,

 

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.

 

Thanks

Rgds

Marc.

 

2 REPLIES 2
v-rzhou-msft
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

1.png

Table B:

2.png

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.

3.png

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. 

 

amitchandak
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

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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