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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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]))
  )

@ 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!:
The Definitive Guide to Power Query (M)

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]))
  )

@ 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!:
The Definitive Guide to Power Query (M)

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors