Forum Discussion
userelationship
Hello everyone. I hope everyone's ok
I want to sum comercial anual from contracts table by seller in a chosen periode.
It should be simples using USERELATIONSHIP function cose in my model the dates table is not actively connected with contracts.
Here's my model
my (doesn't work measure which i don't know why) measure is like this:
The result is a unique total for each seller.
Can anyone help me please?
Thank you all
The seller column is in contract seller table
Hello tamerj1
This report has none filters or rows or columns anything related to dates.
About my request, do you have any suggestion on how to do this measure?
Thanks
6 Replies
- AlexisOlson
Super User
Can you show what you mean by "doesn't work"? What are you currently getting and what do you expect to get?
- pedroccamaraDBI
Post Partisan
Hello AlexisOlson
Thank you for replying. I'm not an expert on DAX, far from it, but i came up with this solution by trying and trying:Comercial anual =CALCULATE(SUM( Contract[Comercial Anual]), VALUES('Contract Seller'),TREATAS( VALUES('Contract Seller'[ContractID]), Document[ContractID] ))1st question : can you explain this measure?
Now i need to create a measure with distinctcount all contractsID and this is the measure that it's not working. It shows me 3 instead of 2. Maybe if i understood what this measure means....
Can you help?
Thanks a lot- AlexisOlson
Super User
I don't think I have enough information to give a good answer. It's difficult for me to understand what you're trying to do without seeing any underlying data and what result you're expecting based on that data.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
- tamerj1
Community Champion
Because once you activate that relationship there will be two date filters subjected on the 'Contracts' table. One is comming directly from date table and the other one from the date table but through the Documents table. This will confuse the engine the results are usually unexpected and difficult to explain.
- pedroccamaraDBI
Post Partisan
Hello tamerj1
This report has none filters or rows or columns anything related to dates.
About my request, do you have any suggestion on how to do this measure?
Thanks