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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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,

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

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

Thanks

1 ACCEPTED SOLUTION
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.
4 REPLIES 4
Solution Sage

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

Helper II

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

IF(HASONEVALUE('Lagerführend'[Artikel]), [rank-measure]) it's working.
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.
Helper II

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

## Helpful resources

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Join our Community Sticker Challenge

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

#### Power BI Monthly Update - July 2024

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

#### Fabric Community Update - July 2024

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

Top Solution Authors
Top Kudoed Authors