Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
wardlea1
New Member

Distinct count summarisation issues

Hi all,

 

I am trying to do a count distinct of ID within my data set but i am struggling. Unfortuantely I am unable to share my data but i will try and explain below.

 

I am using a tabular model with relationships built between tables. When looking at ID by division and product i get a result similar to the below. Division and product are located in one table and ID is located in another table. There is a relationship between these tables as otherwise I wouldn't be able to get the data below 'linked'

 

DivisionProductID
A1A001
B3A002
C6A003
B3A004
B3A005
B4A006
C7A007
B5A008
C6A009
A2A010
A1A001
B3A002

 

I then want to do a distinct count of the IDs, bringing back the total as 10 (the last two records in the above are duplicates). This is all fine but when it comes to provide a summary at a higher level the results come out the same for all divisions products. Such as the below

 

DivisionID
A10
B10
C10

 

 

ProductID
110
210
310
410
510
610
710

 

DivisionProductID
A110
A210
B310
B410
B510
C610
C710

 

Whereas what I want is the following

 

DivisionProductID
A11
A21
B33
B41
B51
C61
C72

 

Any suggestions?

 

thanks

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

I am not sure if I understood your question correctly, but one of ways is to create a measure like below.

 

Picture4.png


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

View solution in original post

2 REPLIES 2
MahyarTF
Memorable Member
Memorable Member

Hi,

As your sample data I create two tables in Power BI and made a relationship between them:

MahyarTF_0-1660557456772.png

- Then create a measure on Sheet with Id :

CntDivision = DISTINCTCOUNT(Sheet114[Id])
- Then use the particular measure in my visual as below :
MahyarTF_1-1660557732479.png

Appreciate to Kodus

Mahyartf
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

I am not sure if I understood your question correctly, but one of ways is to create a measure like below.

 

Picture4.png


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.