Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I need to count the number of times that both a column in one table has a certain value and a column in another table has a certain value.
I have a Filter for the 'epro trauma data' table:
I have a filter for the 'cad inmain' table:
CALCULATE(COUNTROWS('cad inmain'), FILTER('cad inmain','cad inmain'[secsar2tr]<900))
What I need is to count the rows in 'epro trauma data' when both conditions exist.
'epro trauma data' is linked to 'epro incident data' by a one-to-one relationship with filtering in both directions.
'epro incident data' is linked to 'cad inmain' by a many-to-one relationship with filtering in both directions.
Any help would be appreciated.
Once this is all done - I need to be able to use slicers for date and a few other fields in "'epro incident data'
Solved! Go to Solution.
Hi @DarrelDonatto ,
According to your description, here's my solution.
Count is a measure in epro trauma data table.
Count =
CALCULATE (
COUNTROWS ( 'epro trauma data' ),
FILTER (
ALL ( 'epro trauma data' ),
'epro trauma data'[TIME_OF_TRAUMA_ALERT] <> BLANK ()
),
FILTER ( ALL ( 'cad inmain' ), 'cad inmain'[secsar2tr] < 900 )
)
Get the expected result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @DarrelDonatto ,
According to your description, here's my solution.
Count is a measure in epro trauma data table.
Count =
CALCULATE (
COUNTROWS ( 'epro trauma data' ),
FILTER (
ALL ( 'epro trauma data' ),
'epro trauma data'[TIME_OF_TRAUMA_ALERT] <> BLANK ()
),
FILTER ( ALL ( 'cad inmain' ), 'cad inmain'[secsar2tr] < 900 )
)
Get the expected result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much. Works perfectly..
You can combine these filters
CALCULATE(COUNTROWS('epro trauma data'), 'epro trauma data'[TIME_OF_TRAUMA_ALERT]<>"",'cad inmain'[secsar2tr]<900)
However your data model may not support this query.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.