Forum Discussion
Power BI - Ranking on a Matrix Visual
Have an issue, I've encountered with the Rank Measure used for our Parent and Child categories in Power BI visualizations.
We have a Rank Measure in place that effectively calculates the ranks for our Main Category (Parent) and its corresponding Subcategories (Child) based on the Total Est GP.
The measure works perfectly when I'm using the "Expand all down one level hierarchy" button, as it provides accurate ranks for the Main Category and its associated Subcategories.
However, I've noticed that when I attempt to expand by using the + Icon Symbol, Which drill into the Child values by expanding them from a specific Parent level, the ranks do not display the correct results.
It seems that there is a visual level problem when drilling down into the Child values from a specific Parent.
I would greatly appreciate it if someone can help.
.This Works fine when using the Expand down all level hierarchyDoes not work using + Icon Symbol
13 Replies
- rubayatyasminCommunity Champion
- Sanju_BIFrequent Visitor
Tried of doing this mate, but seems to be not helping!.
- pratyashasamalMemorable Member
Hi Sanju_BI ,
You can use INSCOPE function with RANK function to get desired output . OR try using DENSE function.RANKX =RANKX (ALLSELECTED ( 'Product'[Test] ), [Sales], , DESC, DENSE )
Thanks,
Pratyasha SamalHas this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C- Sanju_BIFrequent Visitor
Here is my Measure, that i wrote for Ranking.
Rank =
VAR ismfFiltered = ISINSCOPE('Customer GP Data'[New MF Code & Parent Name])
VAR isCustFiltered = ISINSCOPE('Customer GP Data'[Customer Name & Code])RETURN
SWITCH(
TRUE(),
AND(ismfFiltered, NOT(isCustFiltered)),
IF(
COUNTROWS('Customer GP Data') > 0,
RANKX(
FILTER(
ALLSELECTED('Customer GP Data'[New MF Code & Parent Name]),
[Total Est GP] > 0
),
[Total Est GP],
,
DESC,
Dense
),
BLANK()
),
isCustFiltered,
IF(
COUNTROWS('Customer GP Data') > 0,
RANKX(
FILTER(
ALLSELECTED('Customer GP Data'[Customer Name & Code]),
[Total Est GP] > 0
),
[Total Est GP],
,
DESC,
Dense
),
BLANK()
),
BLANK()
)- pratyashasamalMemorable Member
Sanju_BI , have you created heirarchy for the parent and child columns ?
Thanks,
Pratyasha Samal
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C