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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
swaroopkumarmg
Helper II
Helper II

Distinct Count

Hello there,

I'm facing an issue with how the distinct count works.

 

i have a data set containing below fields and trying to accomplish 2 line graphs

1. Opportunity ID (duplicates)

2. Region 

3. 4 Products

4. quarter date

 

1st graph:

has Quarter date in X axis, legends are set to Region and values are set to Opportunity ID

 

2nd graph:

has Quarter date in X axis, legends are set to Products and Values are set to Opportunity ID

 

Issue:

when the Opportuity ID is set to Count and i compare both the graphs for a perticular month in a quarter the values from both graphs match.

 

but when the Opportunity ID is set to Count(distict) and compare, they are showing differnt values.

 

With Products

swaroopkumarmg_1-1596720502539.png

With Regions

swaroopkumarmg_2-1596720551442.png

 

 

Below is an example from Excel pivot  and how the data show be.

Row LabelsJanFeb
Americas2011
APAC55
EMEA126
LATAM  
Grand Total37

22

 

Row LabelsJanFeb
Product A65
Product B109
Product C146
Product D72
Grand Total3722

 

6 REPLIES 6
v-diye-msft
Community Support
Community Support

Hi @swaroopkumarmg 

 

Based on the posts from the above, you might refer to the official documents for more hints:

https://docs.microsoft.com/en-us/dax/distinctcount-function-dax

https://docs.microsoft.com/en-us/dax/count-function-dax

 

https://www.bing.com/videos/search?q=Count(distict)+in+power+bi&docid=608010671532476606&mid=7F3C8BB...

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Pragati11
Super User
Super User

Hi @swaroopkumarmg ,

 

So the COUNT function counts all the rows within your dataset including duplicate values for your OpportunityID column.

But, when you use DISTINCTCOUNT on OpportunityID column, it just counts the unique values, ignoring any duplicates in this column in the data.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Thank you so much for replying, the problem im facing here is not the difference between Count and Distinctcount functions.

 

Im using distinctcount function for OppID in both the graphs where the data set is the same but the only difference is the legend.

the objective here is to have the sum of the values in a perticulat month to be the same in both the graphs, but im getting different values. 

 

Please go through my post completely and help me out.

 

thanks

Greg_Deckler
Community Champion
Community Champion

@swaroopkumarmg - Right, count counts all of the rows including duplicates. Count (distinct) does not count duplicates.

 

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thanks for replying

 

but that is not my issue.

Please go through my post completely and help me out.

 

Thanks again 

Hi @swaroopkumarmg 

 

Could you plz kindly provide the dummy pbix? 

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors