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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Dynamic count by filtered related table

Hi Experts

 

I have two Tables A and B there is a relationship between the two tables (one to many) based in years.  i have the following measure which i am using to count the number of occurance in a particular year.

 

Count = 
VAR Records = CALCULATE(SUM(Sheet1[Count]),RELATEDTABLE(Sheet1)) 

Return
If(ISBLANK(Records),0,Records)

This mesure is in table B, Table A is Sheet 1.

Here is the problem

I have a filter on my Report which when is selected to ALL works fine, gives the correct results and all the graphs and counts are correct. i want to be able to select another product from the Products filter and recalculate table B based on my filter selction.

 

2 REPLIES 2
dax
Community Support
Community Support

Hi Route217,

I can’t reproduce your design based on your information. So If possible, could you please  inform me more detailed information (such as your data sample and relationship structure, what is table A and Table B, and how do  they link ? And your expecting output) by image or drawings? Then I will help you more correctly.

Below is my design

Count = 
VAR Records = CALCULATE(SUM('product'[AMOUNT]),RELATEDTABLE('product')) 

Return
If(ISBLANK(Records),0,Records)

25.png

Best Regards,

Zoe Zhi

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

hi Zoe, firstly apologies it was late yesterday. see image of my design.

Capture.PNG

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors