Forum Discussion
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 :
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
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
4 Replies
- visheshjain
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
- pedroccamaraDBI
Post Partisan
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?- visheshjain
Impactful Individual
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