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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
MattiaMaetini
Helper I
Helper I

RANKX LIVE CONNECTION SSAS Tabular 2017 - DRILLDOWN MATRIX without ISINSCOPE DAX FUNCTION AVAILABLE

Hi expert,

it's all into Subject! 😅😂


I'm going crazy about this requirement: I need to create a dinamyc rank in a Matrix with 3 level of drill down.

I was able to create rank using RANKX fuction on a single dimension for another table; searching on Internet I readed a lot of papers for solve the problem, but ISINSCOPE Dax function isn't available with live connection on SQLServer Tabular Analysis 2017.

 

Is there a workaround for solve this problem? (I tried ISFILTERED and HASONEVALUE but the behavior is not right)

BR,

M

3 REPLIES 3
Anonymous
Not applicable

Hi @MattiaMaetini ,

I think you can use the ISFILTERED function in combination with other DAX functions to achieve the desired behavior. For example, you can create a measure that checks if a certain level of your hierarchy is filtered and then apply the RANKX function accordingly. Here’s a conceptual example of how you might structure such a measure:

DynamicRank = 
VAR CurrentLevel = 
    SWITCH(
        TRUE(),
        ISFILTERED(Table[Level1]), "Level1",
        ISFILTERED(Table[Level2]), "Level2",
        ISFILTERED(Table[Level3]), "Level3",
        "Total"
    )
RETURN
    SWITCH(
        CurrentLevel,
        "Level1", RANKX(ALL(Table[Level1]), CALCULATE(SUM(Table[Measure]))),
        "Level2", RANKX(ALL(Table[Level2]), CALCULATE(SUM(Table[Measure]))),
        "Level3", RANKX(ALL(Table[Level3]), CALCULATE(SUM(Table[Measure]))),
        BLANK()
    )

 

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Tks for your answer.

I tried to apply it, but unfortunately in my opinion the problem is that my gerarchy in Matrix is based on 3 different dim tables, so level1, level2 and level3 are always TRUE when I applied ISFILTERED() function.

 

PS: Another workaround could be to calculate RANKX only for the first level of my 3-gerarchy (i.e. on the first Dim I set as the one on the Matrix-Rows section).

 

Any other suggests?


BR,

M

Anonymous
Not applicable

Hi @MattiaMaetini ,

Have you tried the workaround you mentioned? I think it is a step in the right direction. It goes some way to troubleshooting the problem and getting it fixed.

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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