Forum Discussion

Rob1992's avatar
Rob1992
New Member
6 years ago
Solved

Multiple top N filters

Hi,   I am new to Power BI, but love it already! Amazing tool. Unfortunately I am facing an issue where I am unable to add multiple top N filters to a bar chart.   What I am trying to visualize ...
  • v-zhenbw-msft's avatar
    6 years ago

    Hi Rob1992 ,

     

    We can create a calculate column and use filter on this visual to meet your requirement.

     

    1. We need to create a column to calculate the total of each category.

     

    Sum = 
    CALCULATE(SUM('Table'[Spend]),FILTER(ALLSELECTED('Table'),EARLIER('Table'[Category])='Table'[Category]))

     

     

    2. Then we can create a rank column based on sum column.

     

    Rank = RANKX('Table','Table'[Sum],,DESC,Dense)

     

     

    3. At last we can put the rank column in filter on this visual and configure the top five of supplier name.

     

     

     

    If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

    BTW, pbix as attached.

     

    Best regards,

     

    Community Support Team _ zhenbw

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