Forum Discussion

eden's avatar
eden
Icon for Helper I rankHelper I
6 years ago

Report: How to display TOP 5 Result based on Status ?

Hello 

i got a sharepoint list similar to follows 

 

WorkorderStatuscustomer start date
Onepublishedabc01/08/2020
tworevieweddef24/09/2020
threewaitingxyz17/09/2020
fourdeferedabc 01/12/2020
fivepublishedoiu01/07/2020
sixin progressabc 22/05/2019
sevenin progressdef21/07/2019
eightin progresskjs21/08/2019

 

I am trying to display something like below in Power BI for top 4 customers whose status is not published

 

 

The chart is displaying properly but  i cannot restrict the top 4 customers as all the customers are diplaying in the report

 

Regards

12 Replies

  • eden 

    Try this measure please

    Top4 = 
    IF( 
        RANKX( 
            ALLSELECTED('Table'[customer ]),
            CALCULATE(
                COUNTROWS('Table'),
                'Table'[Status] <> "published"
            ),,
            DESC) <5, 
        CALCULATE(
            COUNTROWS('Table'),
            'Table'[Status] <> "published"
        ),
        BLANK()
    )

     

    ________________________

    If my answer was helpful, please consider Accept it as the solution to help the other members find it

    Click on the Thumbs-Up icon if you like this reply 🙂

    YouTube  LinkedIn

    • eden's avatar
      eden
      Icon for Helper I rankHelper I

      How to use the below solutution 

       

      Axis : Customer 

      Value : Top 4

       

       

      • Fowmy's avatar
        Fowmy
        Icon for Super User rankSuper User

        eden 

        Yes, you are right.

        ________________________

        If my answer was helpful, please consider Accept it as the solution to help the other members find it

        Click on the Thumbs-Up icon if you like this reply 🙂

        YouTube  LinkedIn