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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello all,
I want to count distinct contracts number for every table connected to contracts. Let me show you my model :
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
Solved! Go to 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
Proud to be a Super User!
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
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
Proud to be a Super User!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 33 | |
| 31 | |
| 19 | |
| 12 | |
| 11 |