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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
sajjadansari
Regular 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
v-tangjie-msft
Community Support
Community Support

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
v-tangjie-msft
Community Support
Community Support

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, 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
)
)

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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