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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
ViralPatel212
Resolver I
Resolver I

RANKING ADDING 1 TO VALUE

Hi Team,

 

Wondering if you could help. 

I am trying to create a simple summarized table where it shows where Barclays sits for each category.

 

in my main table the ranking works using this formula. I have filtered the category to NNIP and it shows that Barclays is ranked 2 based of Vol. (MM).

Ranking: IF( [Ranking Size (Vol)] = blank(), BLANK(), RANKX(ALLSELECTED('Dealer Ranking'[Counter Party]),[Ranking Size (Vol)],,DESC))

ViralPatel212_0-1710933445837.png

However when i table showing jus category and the rank it doesn't work.

In this on the allselected didnt work so i tried:  

Dealer Ranking 4 = RANKX(ALL('Dealer Ranking'[Counter Party]),[Ranking Size (Vol)],,DESC

ViralPatel212_1-1710933613506.png

as you can see i have put a visual filter to show Barclays but im getting 3 rather than 2?

Hope this make sense.

 

thanks

viral

 

 

1 ACCEPTED SOLUTION
ViralPatel212
Resolver I
Resolver I

Resolved the issue: 

 

created a measure:

Measure:
var _rank = RANKX(ALL('Dealer Ranking'[Counter Party]),[Ranking Size (Vol)],,DESC)
VAR _tab =
    FILTER (
        ADDCOLUMNS (
            ALL( 'Dealer Ranking'[Counter Party] ),
            "@rank", [Dealer Ranking Number 2 test]
        ),
        [Counter Party] = "Barclays"
    )
VAR _rankbarclays =
 ( MAXX ( _tab, [@rank] )
RETURN

_rankbarclays

View solution in original post

4 REPLIES 4
ViralPatel212
Resolver I
Resolver I

Resolved the issue: 

 

created a measure:

Measure:
var _rank = RANKX(ALL('Dealer Ranking'[Counter Party]),[Ranking Size (Vol)],,DESC)
VAR _tab =
    FILTER (
        ADDCOLUMNS (
            ALL( 'Dealer Ranking'[Counter Party] ),
            "@rank", [Dealer Ranking Number 2 test]
        ),
        [Counter Party] = "Barclays"
    )
VAR _rankbarclays =
 ( MAXX ( _tab, [@rank] )
RETURN

_rankbarclays
ViralPatel212
Resolver I
Resolver I

@amitchandak any chance of you looking into this?

 

 

amitchandak
Super User
Super User

@ViralPatel212 , Try new new function in the measure

 

RANK ( desc, ALLSELECTED('Dealer Ranking'[Counter Party]), orderBy([Ranking Size (Vol)]), LAST )

@amitchandak 

i think you have given the wrong measure here? i tried that and i get a error: 

The value for RANK's Ties parameter is invalid. The admissble values are: SKIP, DENSE.

 

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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