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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello guys
From this model, i would like to be able to count all documentID (Document) that belong to a certain seller name and/or seller type (ContractSeller). Each saller may have more than 1 document and the seller type can have more than one value
Can you help?
Thanks a lot
Solved! Go to Solution.
Hi @pedroccamaraDBI ,
Per the description, I create some sample data and build the following relationships for them.
ContractSaller Table
Contract Table
Document Table
Then, create the following Measure.
CountDocument =
CALCULATE (
DISTINCTCOUNT ( Document[DocumentID] ),
TREATAS ( VALUES ( ContractSaller[ContractID] ), Document[ContractID] )
)
The result should look like this.
Also, attached the pbix file as reference.
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!
Best Regards,
Community Support Team _ Caiyun
Hi @pedroccamaraDBI ,
Per the description, I create some sample data and build the following relationships for them.
ContractSaller Table
Contract Table
Document Table
Then, create the following Measure.
CountDocument =
CALCULATE (
DISTINCTCOUNT ( Document[DocumentID] ),
TREATAS ( VALUES ( ContractSaller[ContractID] ), Document[ContractID] )
)
The result should look like this.
Also, attached the pbix file as reference.
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!
Best Regards,
Community Support Team _ Caiyun
Hi @pedroccamaraDBI
Can you please share sample data or pbix file
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 |
|---|---|
| 9 | |
| 9 | |
| 8 | |
| 6 | |
| 6 |
| User | Count |
|---|---|
| 20 | |
| 20 | |
| 17 | |
| 14 | |
| 14 |