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
Anonymous
Not applicable

Measure in DAX: How to count rows of column A with same value based on unique ID in (column B)

Hello,

 

I'm still fairly new to using DAX in PowerBI. I was wondering how I can count number of rows based on a unique value.

 

So for instance:

 

Table 1

Class  |   Lang

------------------

 1      |   English

 1      |   English

 1      |   English

 1      |   Chinese

 2      |   Italian

 3      |   Arabic

 3      |   Arabic

 3      |   Chinese

 

What I was hoping for:

Resulting measure "Result"

Class  |   Language  |   Result

---------------------------------------

1        |   English      |    3

1        |   Chinese     |    1

2        |    Italian       |    1

3        |    Arabic       |   2 

3        |    Chinese    |    1

 

How can I create the measure "Result" in DAX based on the example diagrams above?

 

Thanks

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

You don't need to create the measure "result" to do that, you only have to add "Lang" again to values pane and select "count" option fos this.

 

See the example:

 

count.png

View solution in original post

v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

Or you can just use measure 

Result = COUNT('Table'[Lang])

Capture.PNG 

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

Or you can just use measure 

Result = COUNT('Table'[Lang])

Capture.PNG 

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

You don't need to create the measure "result" to do that, you only have to add "Lang" again to values pane and select "count" option fos this.

 

See the example:

 

count.png

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!

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