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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Rankx avoid visual slicer

Hi There

 

I Have two table Sale & Region, what i want todo is Averaging the BranchID value and then use rankx for making rank the branchID.

 

Avg = CALCULATE(AVERAGE(Sale[Value]))
Rank = rankx(all(Region[Branch ID]),[Avg],,DESC,Skip)
 
How i can using the Slicer "Region" with static Rank?
 
My goals is when i Click Slicer "Region Two" the rank will show like this
 
Branch IDAvgRank
C17.57
D236
F275
G34.54

 

instead of picture below.

 

dindaisme_0-1622693603617.pngdindaisme_3-1622693699801.png

 

 

 

Here are my tables

Sale

Branch IDValue
A10
B20
C30
D40
F50
G60
H70
I80
J90
A3
B1
C5
D6
F4
G9
H7
I3
J1

 

Region

RegionBranch ID
OneA
OneB
TwoC
TwoD
TwoF
TwoG
ThreeH
ThreeI
ThreeJ
1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

Please check the below picture and the pbix file's link down below.

 

Picture1.png

 

Rank Measure =
IF (
NOT ISBLANK ( [Avg Measure] ),
RANKX (
CROSSJOIN ( ALL ( Sales[Branch ID] ), ALL ( Region[Region] ) ),
[Avg Measure],
,
DESC
)
)
 
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Woow Thx, im missing The "Crossjoin" function.

 

its works

Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

Please check the below picture and the pbix file's link down below.

 

Picture1.png

 

Rank Measure =
IF (
NOT ISBLANK ( [Avg Measure] ),
RANKX (
CROSSJOIN ( ALL ( Sales[Branch ID] ), ALL ( Region[Region] ) ),
[Avg Measure],
,
DESC
)
)
 
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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