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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
joannasokolowsk
Helper II
Helper II

Number of row adjusted to filters

Hey,

I would like to ask you for an advise regarding adding new column to the tabel chart which will show number of row. Also, this needs to change according to filters/slicers. 

 

Example  - this is the table where I would like to see No of row for each line (sample of the date - in original one there are more rows and columns) 

NoNameCourseCountrylanguage
1JohnACUSEN
2JohnPCUSEN
3AnnaBKUSPL
4AnnaACUSPL
5KatePCItalyPL
6KateZDItalyPL

 

When I filter only Italy under Country , No should change accordingly (I can also select multiple filters at once - language, country, course etc) Kate was 5-6 but now should be 1-2. 

 

NoNameCourseCountrylanguage
1KatePCItalyPL
2KateZDItalyPL

 

Thank you in advance!

Asia

2 ACCEPTED SOLUTIONS
harshnathani
Community Champion
Community Champion

HI @joannasokolowsk ,

 

Create a measure

Ranki = RANKX(ALLSELECTED(Table7),CALCULATE(SUM(Table7[No])),,ASC)

 

1.JPG

 

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

View solution in original post

HI @joannasokolowsk ,

 

Simply create an index column in Power Query.

 

1.JPG

 

Regards,

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

View solution in original post

6 REPLIES 6
harshnathani
Community Champion
Community Champion

HI @joannasokolowsk ,

 

Create a measure

Ranki = RANKX(ALLSELECTED(Table7),CALCULATE(SUM(Table7[No])),,ASC)

 

1.JPG

 

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Hey,

I tried to use it but the thing is that I do not have No column in my dataset 🙂 I want to create it to show the row number 🙂 Can you please hep with changing this expression ?

 

Thanks,

Asia

HI @joannasokolowsk ,

 

Simply create an index column in Power Query.

 

1.JPG

 

Regards,

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Perfect thanks!

HI @joannasokolowsk ,

 

You can also try this DAX

Rankii = RANKX(ALLSELECTED(Table7),CALCULATE(CONCATENATE(MAX(Table7[Course]),MAX(Table7[language]))),,ASC)

 

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Anonymous
Not applicable

You need to use the Rankx function of DAX. click here to see a detailed example

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors