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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
avaldiviezo
Advocate II
Advocate II

new column with ranking

Hello, I'm t creating a ranking by state or location, and based on the largest monetary amount, but when the monetary amount is the same in several cases in the corresponding version, skip 1   , departamento = state , MontoActualizadoPIP_Decimal = is money or number and the bd is    oeee VW_ReporteDetalladoMonitoreo, I need it to be correlative and not duplicate

 
RANKX(
    FILTER(
        ALL('oeee VW_ReporteDetalladoMonitoreo'),
        'oeee VW_ReporteDetalladoMonitoreo'[Departamento] = EARLIER('oeee VW_ReporteDetalladoMonitoreo'[Departamento])
    ),
    'oeee VW_ReporteDetalladoMonitoreo'[MontoActualizadoPIP_Decimal],
    ,
    DESC
)
 

hope someone can helpme 

 

Screenshot_1.png

1 ACCEPTED SOLUTION
v-jianpeng-msft
Community Support
Community Support

Hi, @avaldiviezo 

According to your description, you want to create rankings based on the largest currency amount, but in the corresponding version, if the currency amount is the same, it will skip the repeated ranking. You can try the following DAX expression:

RANKX (
    FILTER (
        ALL ( 'oeee VW_ReporteDetalladoMonitoreo' ),
        'oeee VW_ReporteDetalladoMonitoreo'[Departamento]
            = EARLIER ( 'oeee VW_ReporteDetalladoMonitoreo'[Departamento] )
            && 'oeee VW_ReporteDetalladoMonitoreo'[MontoActualizadoPIP_Decimal]
                <> EARLIER ( 'oeee VW_ReporteDetalladoMonitoreo'[MontoActualizadoPIP_Decimal] )
    ),
    'oeee VW_ReporteDetalladoMonitoreo'[MontoActualizadoPIP_Decimal],
    ,
    DESC
)

In the expression, I added a new condition in Filter for filtering repeated items. I hope this expression can help you.

 

 

 

 

How to Get Your Question Answered Quickly

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Jianpeng Li

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

2 REPLIES 2
v-jianpeng-msft
Community Support
Community Support

Hi, @avaldiviezo 

According to your description, you want to create rankings based on the largest currency amount, but in the corresponding version, if the currency amount is the same, it will skip the repeated ranking. You can try the following DAX expression:

RANKX (
    FILTER (
        ALL ( 'oeee VW_ReporteDetalladoMonitoreo' ),
        'oeee VW_ReporteDetalladoMonitoreo'[Departamento]
            = EARLIER ( 'oeee VW_ReporteDetalladoMonitoreo'[Departamento] )
            && 'oeee VW_ReporteDetalladoMonitoreo'[MontoActualizadoPIP_Decimal]
                <> EARLIER ( 'oeee VW_ReporteDetalladoMonitoreo'[MontoActualizadoPIP_Decimal] )
    ),
    'oeee VW_ReporteDetalladoMonitoreo'[MontoActualizadoPIP_Decimal],
    ,
    DESC
)

In the expression, I added a new condition in Filter for filtering repeated items. I hope this expression can help you.

 

 

 

 

How to Get Your Question Answered Quickly

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Jianpeng Li

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

ryan_mayu
Super User
Super User

could you pls provide some sample data? if the amount is duplicated , then what's the expected output?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.