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

Join 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.

Reply
Anonymous
Not applicable

when to use count instead of DistinctCount?

I am doing a quick course on DAX in datacamp... they have created this measure:

Transaction count = Count([FactInternetSale[SalesOrderNumber])

 

And then using it to do:
Average Transaction = DIVIDE([Total Sales], [Transaction Count])

 

Why they used Count and not CountDistinct?

This seems wrong... Same SalesOrderNumber might appear 100 times, and Count shall count 100 orders...

3 REPLIES 3
Anonymous
Not applicable

Hello @Anonymous 
They are using count to show the average of each transaction and each transaction has a different ID. In this case, you can use both COUNT and DISTINCTCOUNT. You should use COUNT as this will increase the performance.

Anonymous
Not applicable

no se usa  CountDistinct, ya que solo se estaria contando los campos distintos del campo [Transaction Count]),

el promedio se toma de la sumatoria de los datos y se divide en  la cantidad de datos. sin importar que sean iguales 

Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

I think, in the FactInternetSales Table, SalesOrderNumber Column is the primary key column. If I am not wrong, the result might be the same.

 

Hi, My name is Jihwan Kim.

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


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

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.