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
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
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.