Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hi Everyone,
A very quick and easy question. I just wanted to count the number of rows/entity based on different column. Its pretty easy in excel but I am unable to find the way in PowerBI.
Below is the outout and input which I have calcualted using excel..
| Name | Class | Count |
| Uphar | Maths | 4 |
| Uphar | Maths | 4 |
| Uphar | Maths | 4 |
| Uphar | Maths | 4 |
| Uphar | Science | 2 |
| Uphar | Science | 2 |
| Shubham | Science | 5 |
| Shubham | Science | 5 |
| Shubham | Science | 5 |
| Shubham | Science | 5 |
| Shubham | Science | 5 |
| Shubham | History | 2 |
| Shubham | History | 2 |
| Uphar | Computer | 1 |
Here, I just wanted to calculate how many times a subject is coming for a particular name and wanted the same in count column.
Excel Formula is = COUNTIFS($B$3:$B$16,B3,$C$3:$C$16,C3)
Created a measure but it is not working..
Solved! Go to Solution.
@Anonymous - So you could create a column or measure like:
Measure =
VAR __Name = MAX([Name])
VAR __Class = MAX([Class])
RETURN
COUNTROWS(FILTER(ALL('Table'),[Name]=__Name && [Class]=__Class))
Column =
VAR __Name = [Name]
VAR __Class = [Class]
RETURN
COUNTROWS(FILTER('Table',[Name]=__Name && [Class]=__Class))
@Anonymous - So you could create a column or measure like:
Measure =
VAR __Name = MAX([Name])
VAR __Class = MAX([Class])
RETURN
COUNTROWS(FILTER(ALL('Table'),[Name]=__Name && [Class]=__Class))
Column =
VAR __Name = [Name]
VAR __Class = [Class]
RETURN
COUNTROWS(FILTER('Table',[Name]=__Name && [Class]=__Class))
Hi @Greg_Deckler ,
Thank you so much, I have created a calculated column and its working perfectly.
Kudos to you! Thank you for the quick support.
Regards
Uphar
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 |