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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
rwalsh200493
New Member

DAX distinct counts

Hi,

 

I am newish to Power Bi i am trying to find out how many operators have entered data each day.

 

i have removed alot of the noisey information but from the below i would like the column "Operator" to have the value 3 next to 03/01/2024 and only have one row for this and this logic flowing down.

 

I thought changing the "summarization" to "count(distinct" would complete this but it made no change.

 

i have also tried a "distinctcount" within the "sumarize" portion of the formular and this has not worked.

 

If someone can provide me with some advice as to how to complete this that would be great.

 

rwalsh200493_0-1708612565590.png

 

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@rwalsh200493 Try:

Table = 
  SUMMARIZE(
    'Table',
    'Table'[Date.1].[Date],
    "Operator",
    COUNTROWS(DISTINCT('Table'[Operator]))
  )


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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

@rwalsh200493 Try:

Table = 
  SUMMARIZE(
    'Table',
    'Table'[Date.1].[Date],
    "Operator",
    COUNTROWS(DISTINCT('Table'[Operator]))
  )


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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

This solution was ideal thanks as i needed to complete this through DAX and not the power Query editor as i used DAX to create the table. I should have put that in the intial brief

Syk
Super User
Super User

Open your Power Query editor and select your date column > Group by

Syk_0-1708613380297.png

make sure you're grouping on your date then select "Count Distinct Rows" under operation

Syk_1-1708613445106.png

 

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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