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

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.

Reply
LangeJan
Helper I
Helper I

Count not working when joining with other table

 

Hi
I have two tables. 'CUSTOMERS' and 'REFERENCE'.
I have made a count of how many times a VATNUMBER occurs in 'CUSTOMERS'. The count works fine, right up until I add data from the 'REFERENCE' table.

 

 

Can anyone tell how I can keep the count even though I want to see data from both tables?

Thanks in advance.

 

VATNUM occurrences = CALCULATE(
COUNTROWS(AXtest_CUSTTABLE);
ALL(AXtest_CUSTTABLE);
VALUES(AXtest_CUSTTABLE[VATNUM])
)

Here the count works fine without data from 'REFERENCE' table
LangeJan_0-1647888527420.png

 

Here the count does not work with data TDCID from 'REFERENCE' table

LangeJan_1-1647888761242.png

 

 
5 REPLIES 5
tamerj1
Super User
Super User

@LangeJan 

You can try

VATNUM occurrences =
CALCULATE (
    COUNTROWS ( AXtest_CUSTTABLE );
    ALL ( AXtest_CUSTTABLE );
    VALUES ( AXtest_CUSTTABLE[VATNUM] );
    REMOVEFILTERS ( References )
)

 

 

 

@tamerj1 Thanks for your suggestion. Unfortunately this does not solve the problem.

@LangeJan 

Sorry for that. 
try to CROSSFILTER the relationship to "None"

Or otherwise, you can add it as measure not a column. Can you please share a screenshot of you data model (relationships) and provide the names of the tables and involved columns?

tamerj1
Super User
Super User

Hi @LangeJan 

Do you have a relationship between the two tables?

Yes I have a relationship between the two tables. There is no data in Tdcid for the mentioned vatnumber.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.