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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Yonah
Helper II
Helper II

RANKX Not working if I add a new column

Hi everyone,
I have a Matrix-Visual, that I'm using to rank my Article (Bezeichnung) by DB3_Lagerführend.
When it's only DB3_Lagerführend and Bezeichnung , the ranking is correct. 
This is the measure I'm using:
Artikel Rank =
RANKX (
ALLSELECTED ( 'Lagerführend'[Bezeichnung] ),
[DB3_Lagerführend],
,
DESC,
DENSE
)


See Picture below,

correct.PNG

But as soon, as I add a second value, I get a wrong ranking.
See Picture below.

false.PNG

So, what is my mistake and is there a way to make sure that total is not rank.

Thanks

1 ACCEPTED SOLUTION
mangaus1111
Solution Sage
Solution Sage

Hi @Yonah ,

try this measure

Artikel Rank =
IF(
    HASONEVALUE('Lagerführend'[Artikel]),
    RANKX (
        ALLSELECTED ( 'Lagerführend' ),
        [DB3_Lagerführend],,
        DESC,
        DENSE
        )
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
mangaus1111
Solution Sage
Solution Sage

Can you please send me sample data of all the columns of your source table?

I found my mistack, if i creat the rank measure first an then use: 

IF(HASONEVALUE('Lagerführend'[Artikel]), [rank-measure]) it's working.
mangaus1111
Solution Sage
Solution Sage

Hi @Yonah ,

try this measure

Artikel Rank =
IF(
    HASONEVALUE('Lagerführend'[Artikel]),
    RANKX (
        ALLSELECTED ( 'Lagerführend' ),
        [DB3_Lagerführend],,
        DESC,
        DENSE
        )
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,
if I'm using this measure all is rankd by 1.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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