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
Chandrashekar
Resolver III
Resolver III

Unique Count : Between Multi Tables

Hello,

 

Could you please help to get DAX formula to get Unique count between two tables.

PBIX: PBIX Sample 

Formula: 

Measure2 = CALCULATE(COUNTROWS(DISTINCT(Table2[Number2])),treatas('Table1',Table1[Number],Table2[Number2]))

 

Regards,

Chandrashekar B

1 ACCEPTED SOLUTION

@Chandrashekar 
You can use 

Count Available in Both = 
COUNTROWS ( 
    FILTER ( 
        INTERSECT ( 
            VALUES ( Table1[Number] ), 
            VALUES ( Table2[Number2] ) 
        ), 
        NOT ISBLANK ( [Number] ) 
    ) 
)

1.png

View solution in original post

5 REPLIES 5
Chandrashekar
Resolver III
Resolver III

Hello,

 

Could you please help to get DAX formula to get Unique count between two tables.

 

PBIX: PBIX Sample 

Formula: 

Measure2 = CALCULATE(COUNTROWS(DISTINCT(Table2[Number2])),treatas('Table1',Table1[Number],Table2[Number2]))
Answer: Should be 5 as A4 is missing in Table2

 

Regards,

Chandrashekar B

 

 

Hi Chandra,

What exactly are you trying to count?

Hello,

 

am trying to count Number ticket(Table1) present in Table2.

Kindly note Table2 may have Number which is not present in Table1.

 

Regards,

Chandrashekar B

@Chandrashekar 
You can use 

Count Available in Both = 
COUNTROWS ( 
    FILTER ( 
        INTERSECT ( 
            VALUES ( Table1[Number] ), 
            VALUES ( Table2[Number2] ) 
        ), 
        NOT ISBLANK ( [Number] ) 
    ) 
)

1.png

Hello,

 

Thank you. It is working fine.

 

Regards,

Chandrashekar B

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.