cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
AdiAsavaid Frequent Visitor
Frequent Visitor

RANKX Function at higher levels in hierarchy

RankX_IssueAtParentLevel.JPGRankX issue at Parent LevelHello All:

Hoping somebody can help me to see what I am doing incorrectly.

This is regarding RANK function. I have a simple table of 3 columns called Dim_Plan with PlanName, #LivesPerPlan, AccountName. AccountName is parent of PlanName.

The Ranking formula is generic and is not referencig any specific Column. It works correctly at the lowest level (PlanName) but the RankX function does not work at higher level which is AccountName.

What am I doing incorrectly here?

Thanking you in advance for your help.

Best regards....Adi

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support Team
Community Support Team

Re: RANKX Function at higher levels in hierarchy

@AdiAsavaid,

 

You may use ALLSELECTED ( Dim_Plan[AccountName] ) instead.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AdiAsavaid Frequent Visitor
Frequent Visitor

Re: RANKX Function at higher levels in hierarchy

Hello Sam:

Following up on my previous message and your suggestion:

Yes, the suggested formula does work but I have to create a new measure now. Specifically:

#RankAcct = RANKX(AllSELECTED(Dim_Plan[AccountName]), [#LivesPlan]) - works but it is a new measure

#Ranking = RANKX(AllSELECTED(Dim_Plan[AccountName]), [#LivesPlan]) - works on the lowest level for Dim_Plan table.

I have 6 different other attributes like AccountName in the Dim_Plan, and guess I would have to create new Measures for each.

I was hoping a single measure could be used instead of so many different measures.

For the moment I can live with the different measures.

Thanks for the solve.

Best regards....Adi

 

3 REPLIES 3
Community Support Team
Community Support Team

Re: RANKX Function at higher levels in hierarchy

@AdiAsavaid,

 

You may use ALLSELECTED ( Dim_Plan[AccountName] ) instead.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AdiAsavaid Frequent Visitor
Frequent Visitor

Re: RANKX Function at higher levels in hierarchy

Hello Sam:

Many thanks for your response.

However, my measure '#Ranking' does use AllSELECTED and is as follows:

#Ranking = RANKX(AllSELECTED(Dim_Plan), [#LivesPlan]) and

#LivePlan = CALCULATE(SUM(Dim_Plan[#LivesPlanC]))

 

Do you have any other suggestion to make this work ?

Thanks and best regards....Adi

AdiAsavaid Frequent Visitor
Frequent Visitor

Re: RANKX Function at higher levels in hierarchy

Hello Sam:

Following up on my previous message and your suggestion:

Yes, the suggested formula does work but I have to create a new measure now. Specifically:

#RankAcct = RANKX(AllSELECTED(Dim_Plan[AccountName]), [#LivesPlan]) - works but it is a new measure

#Ranking = RANKX(AllSELECTED(Dim_Plan[AccountName]), [#LivesPlan]) - works on the lowest level for Dim_Plan table.

I have 6 different other attributes like AccountName in the Dim_Plan, and guess I would have to create new Measures for each.

I was hoping a single measure could be used instead of so many different measures.

For the moment I can live with the different measures.

Thanks for the solve.

Best regards....Adi