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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
harshaSampath81
Helper II
Helper II

Rank change according to selection

I am using Rank function 

 

Rank = 
RANKX ( ALLSELECTED ( Table1[STORE] ), CALCULATE ( SUM ( Table1[SPACE] ) ) )

 

PBdesktop.JPG

my question is how do I keep Rank as it is when I select  Branch B. simple say when I select Only Branch B my output will be

 

StoreSpaceRank
BRANCH B25002

 

(Because Rank will be changed according to selection)

 

I want to keep Rank as my first data set though I selected One branch from the Slicer. ( I don't want to change Rank No)

 

Thank you,

Harsha

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

@harshaSampath81,

 

You can use calculate column instead of measure.

Rank Column = RANKX(Table1, Table1[SPACE])

Or you can modify your measure like below.

Rank Measure = RANKX(ALL(Table1), CALCULATE(SUM(Table1[SPACE])))

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

@harshaSampath81,

 

You can use calculate column instead of measure.

Rank Column = RANKX(Table1, Table1[SPACE])

Or you can modify your measure like below.

Rank Measure = RANKX(ALL(Table1), CALCULATE(SUM(Table1[SPACE])))

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.

 

Zubair_Muhammad
Community Champion
Community Champion

@harshaSampath81

 

Try replacing allselected with all in your measure

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.