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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Anonymous
Not applicable

Distinct Count

I am working on a data set, in which i want to select the atheletes participated in an event from a particular year. The Dax that i am using for E.g for year 2004 is 

Athletes in 2004 = CALCULATE(DISTINCTCOUNT('Summer-Olympic-medals-1976-to-2'[Athlete ID]),'Calendar'[Year]=2004). The result i am getting(1832) is totally different from the actual value(1381). I am unable to figure out what is wrong.
6 REPLIES 6
Anonymous
Not applicable

Hi @Anonymous ,

 

Have you solved your problem? If so, can you share your solution here and mark the correct answer as a standard answer to help other members find it faster? Thank you very much for your kind cooperation!

 

 

Best Regards,

Clara Gong

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.

Anonymous
Not applicable

Hi Clara,

It worked and the problem was actually with my time settings on Laptop and regional settings of powerbi which was giving alterered results to time intelligence DAX

Ashish_Mathur
Super User
Super User

Hi,

There is no mistake in your measure.  However, you should not hard code 2004 in the filter argument of the Calculate function.  Create a year slicer from the Calendar Table and select 2004 there.  Simplify your measure to

Athletes = DISTINCTCOUNT('Summer-Olympic-medals-1976-to-2'[Athlete ID])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Thank You Ashish. I will try this and see how it goes.

Regards

AbhinavJoshi
Responsive Resident
Responsive Resident

Hi @Anonymous .

Can you please provide a sample of your data model?
General advice would be looking for filters coming to your visual.

Anonymous
Not applicable

Hello Abhinav,

Thank you for replying. I am not sure how to share the file, here is the link for the file.In this data i am trying to see how athletes participation has increased over time from 1976-2008 olympics. That means i need to get the unique count of Athletes for every year, and thats where i am getting the wrong value.

https://app.powerbi.com/groups/me/reports/5d6e9c2b-7525-4805-906d-4c1f1bffc8bd/7876d8eb8502623ef626?...

 

Regards

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

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.