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! Learn more

Reply
Anonymous
Not applicable

How to get Rank values without blanks

how to get rank values from starting from 1 when the rest values are blanks

 

Rank.png

6 REPLIES 6
Anonymous
Not applicable

Rank =
if(
	HASONEFILTER( T[Name] )
	&&
	[Total Sales] <> 0,
	
	RANKX(
		FILTER(
			ALLSELECTED( T[Name] ),
			[Total Sales] <> 0
		),
		[Total Sales],
		,
		ASC,
		Dense
	)
	
)

 

Best

D

harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

 

Use the measure.


Rank= 

IF (NOT(ISBLANK([Total Sales)),RANKX(ALLSELECTED(Location_Date),[Total Sales,],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

Rank =

 

Var Ranky = RANKX(ALLSELECTED(Location_Data),CALCULATE([Total sales]),,ASC) Return IF(NOT(ISBLANK([Total sales])),Ranky,BLANK())

 

but still getting the same as above

Hi @Anonymous ,

 

Please use the measure which I sent.

 

Here yu have already calculated the rank in var ranky.

 

While I am calculating rank only when Sales is not blank.

 

Both are different.

 

Regards,

HN

@Anonymous 

 

Rank= 

IF (NOT(ISBLANK([Total Sales)),RANKX(ALLSELECTED(Location_Date),[Total Sales,],ASC))

Anonymous
Not applicable

i have use same measure but still it gaves me 1 rank for blank values i want blanks should not have any rank it should be blank

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.