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
PijushRoy
Super User
Super User

Counts no of rows in calculated column with blank rows by DAX

Hi Team,
I have sample data like this

Index No Series
0 025010-025010
1 025132-025132
2  
3  
4  
5  
6 027019-027019
7  
9  
10  
11 027086-027086
12  
13  
14  
15  
16  
17  

 

I need to create one new column with count of rows group wise (last column) by using DAX

Index No Series Need to count rows for each group
0 025010-025010 1
1 025132-025132 5
2    
3    
4    
5    
6 027019-027019 4
7    
9    
10    
11 027086-027086 7
12    
13    
14    
15    
16    
17    

 

Thanks




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
Community Champion

Weird, the index column is not contiguous. I correct it so that a simple FIRSTNONBLANKVALUE() does the trick.

CNENFRNL_0-1667898998191.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

4 REPLIES 4
CNENFRNL
Community Champion
Community Champion

Weird, the index column is not contiguous. I correct it so that a simple FIRSTNONBLANKVALUE() does the trick.

CNENFRNL_0-1667898998191.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

PijushRoy
Super User
Super User

Hi @v-yalanwu-msft 

Please look into this requirement




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





speedramps
Super User
Super User

Hi  PijushRoy

 

Thanks for reaching out for help

 

Try this ..

 

In Power Query click on No Series and Fill.

This will popoulate the empty columns.

 

The create a DAX measre

Rowcount = COUNTROWS(yourtablename)

 

The on an emoty report canvas annd table visual with

  • No Series
  • Rowcount

     

    pPease click the thumbs up and accept solution button, thank you

No, it will nor work @speedramps 
for Countrows for each row will generate only 1.




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.