Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
17 | |
9 | |
8 | |
7 | |
7 |