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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
pedroccamaraDBI
Post Partisan
Post Partisan

Distinctcount issue about connections

Hello all,
I want to count distinct contracts number for every table connected to contracts. Let me show you my model :apagarseguros.JPG
I want to be able to have the distinctcount of all contracts, by product, by company, by seller_name, by Entity and by document type on that specific date period chosen.
I guess i still didn't understand this issue cose i thought i could have it all in same measure but i guess not.
Can anybody help me?
Thanks a lot all of you

1 ACCEPTED SOLUTION

Hi @pedroccamaraDBI,

 

I would always recommend using CROSSFILTER() function over the Bi-Di relationship.

Unless it is absolutely necessary and if you know what you are doing Bi-Di should not be used as they produce unreliable results.

 

Hope this helps and if it solved your problem, please accept it as a solution and kudo it so that others can find a solution faster.

 

Thank you,

Vishesh Jain

Did I answer your question?
If yes, then please mark my post as a solution!

Thank you,
Vishesh Jain

Proud to be a Super User!



View solution in original post

4 REPLIES 4
visheshjain
Impactful Individual
Impactful Individual

Hi @pedroccamaraDBI ,

 

I think you need to change the filter direction for the Entity/Document table as is not going to reach the Contract table or you will have to define a separate measure with CROSSFILTER() function.

The same goes for the ContractSellar table as well. I'm assuming that a single contract ID can be sold by multiple sellars, which is why you have a 1-* relationship between Contract and ContractSellar table.

 

Rest all the tables should be working fine to get a distinct count of the contracts.

 

Hope this helps.

 

Thank you,

Vishesh Jain

Did I answer your question?
If yes, then please mark my post as a solution!

Thank you,
Vishesh Jain

Proud to be a Super User!



Hello @visheshjain 
You're absolutely right about all. Now my options are learn crossfilter function, OR turn that connection to both ways, rigth? What would you recommend?

Hi @pedroccamaraDBI,

 

I would always recommend using CROSSFILTER() function over the Bi-Di relationship.

Unless it is absolutely necessary and if you know what you are doing Bi-Di should not be used as they produce unreliable results.

 

Hope this helps and if it solved your problem, please accept it as a solution and kudo it so that others can find a solution faster.

 

Thank you,

Vishesh Jain

Did I answer your question?
If yes, then please mark my post as a solution!

Thank you,
Vishesh Jain

Proud to be a Super User!



Thank you very much for all your help @visheshjain 

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.