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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
cosminc
Post Partisan
Post Partisan

column countrows from Related Table

Hi all,

please can you help me with the right syntax?

2 tables: table 1 and table2

for table 2 i need to countrows from table 1 - related table but i need also to include 2 adjust table 1 with 2 filters columnA = 1 && column B = 1

 

something like this:

CALCULATE(COUNTROWS(RELATEDTABLE(table1)), FILTER(table1, columnA = 1 && column B = 1))
 
Thanks,
Cosmin

 

 

 

 

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Share some data and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
d_gosbell
Super User
Super User

Assuming that you are using this expression in a calculated column you might be able to do something like the following

 

CALCULATE(COUNTROWS( FILTER( RELATEDTABLE(table1), table1[columnA] = 1 && table1[column B] = 1))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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