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! Request now

Reply
Krushnab85
Helper I
Helper I

Need a help with dax

I have two tables -
Table 1 is Dimension which shows HCP Id with affiliated Center IDs 

Center IDHCP ID
A21
B22
C23
C24
C25
B26

Table 2 Fact Table - Shows HCP reach with respect to Center ID 

Center IDHCP ID
A21
B28
C23
C24
C30
B22

I want to calculate the reach count with respect to Center ID from Table 1
For example
From Table A for center ID C there are 3 HCPs i.e 23,24,25
and in Fact there are 23,24,30
so from dimension table 2 values are matching so it should return 2.

i need to solution over it.

1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@Krushnab85 First create a relationship between the two tables based on the Center ID column.

 

Reach Count =
VAR DimHCPs = VALUES('Table1'[HCP ID])
VAR FactHCPs = VALUES('Table2'[HCP ID])
RETURN
COUNTROWS(
INTERSECT(DimHCPs, FactHCPs)
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

3 REPLIES 3
anmolmalviya05
Super User
Super User

Hi @Krushnab85, Please try the below measure:

Reach Count =
CALCULATE(
COUNTROWS(Table1),
FILTER(
Table1,
Table1[HCP ID] IN VALUES(Table2[HCP ID])
)
)

Tahreem24
Super User
Super User

@Krushnab85 Try this also by creating a new table:

 

NewTable = INTERSECT(Table1,Table2)
 
Tahreem24_0-1737527607383.pngTahreem24_1-1737527655269.png

 

 

 

 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
bhanu_gautam
Super User
Super User

@Krushnab85 First create a relationship between the two tables based on the Center ID column.

 

Reach Count =
VAR DimHCPs = VALUES('Table1'[HCP ID])
VAR FactHCPs = VALUES('Table2'[HCP ID])
RETURN
COUNTROWS(
INTERSECT(DimHCPs, FactHCPs)
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors