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 I am trying to achieve a distinct count of Document # based on the column "Location Code". In this example the count should equal to 8. I am doing a distinct ct by the invoice number and the results are 1 but I can't figure out how to get it to calculate correctly.
Solved! Go to Solution.
Hi @KatchB ,
According to your description, you want to get the distinct count of location code, you can directly create a measure:
Measure = DISTINCTCOUNT([Location Code])
If you have more than one value in the Document No column, and you want to get the distinct count of Location Code by each Document No. Directly put Document No and Location Code in a visual and select "Count(Distinct)" of the Location Code column.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @KatchB ,
According to your description, you want to get the distinct count of location code, you can directly create a measure:
Measure = DISTINCTCOUNT([Location Code])
If you have more than one value in the Document No column, and you want to get the distinct count of Location Code by each Document No. Directly put Document No and Location Code in a visual and select "Count(Distinct)" of the Location Code column.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @KatchB ,
You can distinct count a combination of Document No and Location Code
The easiest way was to create a Concatenantion of Document No and Location Code. Then do a distinctcount of that
Hi @KatchB
I will presume you want to dispay this number in a Table Visual?
we you're on the right track with your measure.
TotalDocNo= DISTINCTCOUNT(Table[Document No])
Then in the Table add the Location Code first and then the new measure, then you will get the result you want
Thanks
Joe
If this post helps, then please Accept it as the solution
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!