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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
sajjadansari
Frequent Visitor

showing data with filter (Limit the Result) or Top-20 Result.

Top-20 Recovery = CALCULATE('Aging-Current'[TRecovery],FILTER(VALUES('Aging-Current'[New Buying grp]),RANKX(ALL('Aging-Current'[New Buying grp]),[TRecovery],,DESC)<=20))
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @sajjadansari ,

 

I want to acknowledge valuable input provided by Poojara_D12 and rohit1991  . Their initial ideas help guide my approach. However, I noticed that more details are needed to fully understand this issue.

We can modify the measure in this way.

Top-20 Recovery = 
CALCULATE (
    SUM('Aging-Current'[TRecovery]),
    FILTER (
        VALUES ( 'Aging-Current'[New Buying grp] ),
        RANKX ( ALL ( 'Aging-Current'), [TRecovery],MAX('Aging-Current'[TRecovery]), DESC ) <= 20
    )
)

Before:

vtangjiemsft_0-1732602518165.png

After:

vtangjiemsft_1-1732602628411.png

 

Best Regards,

Neeko Tang

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

5 REPLIES 5
Anonymous
Not applicable

Hi @sajjadansari ,

 

I want to acknowledge valuable input provided by Poojara_D12 and rohit1991  . Their initial ideas help guide my approach. However, I noticed that more details are needed to fully understand this issue.

We can modify the measure in this way.

Top-20 Recovery = 
CALCULATE (
    SUM('Aging-Current'[TRecovery]),
    FILTER (
        VALUES ( 'Aging-Current'[New Buying grp] ),
        RANKX ( ALL ( 'Aging-Current'), [TRecovery],MAX('Aging-Current'[TRecovery]), DESC ) <= 20
    )
)

Before:

vtangjiemsft_0-1732602518165.png

After:

vtangjiemsft_1-1732602628411.png

 

Best Regards,

Neeko Tang

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

 

 

 

Dear Mr. v-tangjie-msft

Dear Mr. Poojara,

thnx for your reply, but its not a problem, its a Solution "DAX"

 

Thnks for understanding.

Dear Mr. Poojara,

thnx for your reply, but its not a problem, its a Solution "DAX"

 

Thnks for understanding.

Poojara_D12
Super User
Super User

Hi @sajjadansari 

Can you please try the below DAX:

 

Top-20 Recovery = 
CALCULATE(
    SUM('Aging-Current'[TRecovery]), 
    FILTER(
        VALUES('Aging-Current'[New Buying grp]),
        RANKX(
            ALL('Aging-Current'[New Buying grp]),
            [TRecovery],
            ,
            DESC
        ) <= 20
    )
)

 

Displaying the Top 20 Groups in a Table 

DAX:

Rank = 
RANKX(
    ALL('Aging-Current'[New Buying grp]),
    [TRecovery],
    ,
    DESC
)

 

Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Poojara
Data Analyst | MSBI Developer | Power BI Consultant
Please Subscribe my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS 

 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
rohit1991
Super User
Super User

Hi @sajjadansari 


You can go ahead and try this:

Top-20 Recovery =
CALCULATE(
SUM('Aging-Current'[TRecovery]),
FILTER(
VALUES('Aging-Current'[New Buying grp]),
RANKX(
ALL('Aging-Current'[New Buying grp]),
[TRecovery],
,
DESC
) <= 20
)
)

Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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