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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Sj4489
New Member

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 @Sj4489 ,

 

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.

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/

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

Regards

AbhinavJoshi
Responsive Resident
Responsive Resident

Hi @Sj4489 .

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

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.