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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

DistinctCount with different outputs

Hi DAX experts,

 

I have a bit of a mystery. I get two different outputs using the same DAX formula in two different tables.

The Response ID the same data type used in two different tables.

 

DF_DIM has the data in unique, long format.

 

Survey_FACT has the data in many, long format.

 

Yet I get two competing outputs. Survey_Fact has the correct output. Would appreciate a nudge in troubleshooting why DF_DIM does not produce the correct output. 

 

Total DF =
DISTINCTCOUNT(DF_Dim[Response ID])
 
Total Responses = DISTINCTCOUNT('Survey Fact'[Response ID])
 
Here is the link to the dashboard and data. The Personal Information has been scrubbed. The response ID is an encrypted code. 
 
 
Correct ouput
 
quipmaster_0-1705965095928.png

 

Incorrect Frequency

quipmaster_1-1705965133325.png

 

Sincerely,

 

Luis Pablo Martinez

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

 

 

In Model view, change the cross filter direction from single to both

vjialongymsft_0-1705975577684.png

 

This is the result you want

vjialongymsft_1-1705975853528.png

 

 

 

Best Regards,

Jayleny

 

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

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

You have guided me to the answer.

 

I created this measure that works well.

 

Total DF =
CALCULATE(
    [Total Responses],
    CROSSFILTER(DF_Dim[DF_ID], 'Survey Fact'[DF_ID], Both)
)
 
I read in Expert Modeling in Power BI by Soheil Bahkhshi and Definitive Guide to DAX by SQLBI to rarely use the bidirectional filter.
 
Instead to use the crossfilter() to avoid ambiguity.
 
Your response got me there.
 
Thank you.
Anonymous
Not applicable

Hi @Anonymous 

 

 

In Model view, change the cross filter direction from single to both

vjialongymsft_0-1705975577684.png

 

This is the result you want

vjialongymsft_1-1705975853528.png

 

 

 

Best Regards,

Jayleny

 

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

 

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.