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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Top 5 help

Hello,

 

What I am looking to do is rank the business sponsors in order of who has the most active projects open. I would assume I would have to sum the custom column as it represents the project  but not sure of the logic for the top 5. Any suggestions?

 

Business sponsor      custom

  A                                                 1

  B                                                 1

  C                                                 1

  B                                                 1

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

Hi @Anonymous 

Create whatif parameter,

then create measures

Measure =
CALCULATE (
    SUM ( 'Table'[custom] ),
    FILTER (
        ALLSELECTED ( 'Table' ),
        'Table'[Business sponsor]
            = MAX ( 'Table'[Business sponsor] )
    )
)

Measure 2 = RANKX(ALLSELECTED('Table'),[Measure],,DESC,Dense)

Measure 3 = IF([Measure 2]<=[TOP 5 Parameter Value],1,0)

Capture3.JPG

Best Regards
Maggie
Community Support Team _ Maggie 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-juanli-msft
Community Support
Community Support

Hi @Anonymous 

Create whatif parameter,

then create measures

Measure =
CALCULATE (
    SUM ( 'Table'[custom] ),
    FILTER (
        ALLSELECTED ( 'Table' ),
        'Table'[Business sponsor]
            = MAX ( 'Table'[Business sponsor] )
    )
)

Measure 2 = RANKX(ALLSELECTED('Table'),[Measure],,DESC,Dense)

Measure 3 = IF([Measure 2]<=[TOP 5 Parameter Value],1,0)

Capture3.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

Not very clear based on data you posted. But for rank refer

https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures

 

If not resolved we need more data with example. If possible please share a sample pbix file after removing sensitive information.Thanks.

My Recent Blog -

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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