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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.