Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. 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
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 11 | |
| 11 | |
| 5 | |
| 4 | |
| 3 |