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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
govi
Helper II
Helper II

Count unique values

Hi,

 

I created this table:

vb.jpg

 

Rows: userName

Values: Count of message

Filter: specific message

Filter: Score B

 

I want to count the unique userNames (14).

 

I need the number (14) in another calculation.

 

Can't figure how to do it.

 

Can anyone help?

Thanks!

govi

 

 

 

1 ACCEPTED SOLUTION

The table to which I am referring is the table in the data model that contains the data you are putting into the matrix.

 

I would suggest going through Microsoft's free guided learning for PowerBI if you are unfamiliar with the platform

View solution in original post

4 REPLIES 4
dedelman_clng
Community Champion
Community Champion

You can use DISTINCTCOUNT against the table/column. You can also try COUNTROWS with SUMMARIZE, VALUES or DISTINCT

 

UniqueIDs = DISTINCTCOUNT(Table[UserID])

UniqueIDs = COUNTROWS(
           SUMMARIZE(Table, Table[UserID]) //or VALUES(Table[UserID] or DISTINCT(Table[UserID]
)

Hope this helps

David

Thanks dedelman_cling

 

But I don't know how to do that.

 

Do I first have to create the table with a dax formula?

 

I made the table I showed earlier with the use of the matrix visualization, I dont think I can use DISTINCTCOUNT agaainst that, do I?

 

Thanks!

govi

The table to which I am referring is the table in the data model that contains the data you are putting into the matrix.

 

I would suggest going through Microsoft's free guided learning for PowerBI if you are unfamiliar with the platform

Hi @dedelman_clng,

 

I found a solution:

  • I copied the concerning table.
  • Filtered it
  • And used a COUNTROWS/DISTINCT combination to return the required result

Thanks! You led the way

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.

Top Solution Authors
Top Kudoed Authors