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
CarlsBerg999
Helper V
Helper V

Countrows by filtering two tables

Hi,

 

I have two tables. I have a measure to count rows based on date and status. I need to add another filter to a related table (i have set up a relationship with an ID). It needs to filter values where status in table 2 is also "Open". How do i add another filter to this measure that also applies the filter from another related table? 

 

Measure 1 = COUNTROWS(
FILTER('Table1', [Invoice Date] <= today()
&& [Status] = "Open"))+0
 
Thanks for the help!
 
1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@CarlsBerg999 

Give this a try

measure1 =
CALCULATE (
    COUNTROWS (
        FILTER ( 'Table1', [Invoice Date] <= TODAY () && [Status] = "Open" )
    ),
    'Table2'[Field] = "something"
)

View solution in original post

1 REPLY 1
jdbuchanan71
Super User
Super User

@CarlsBerg999 

Give this a try

measure1 =
CALCULATE (
    COUNTROWS (
        FILTER ( 'Table1', [Invoice Date] <= TODAY () && [Status] = "Open" )
    ),
    'Table2'[Field] = "something"
)

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.