Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Filter TOP N based on another monthly TOP N

Hello,

 

Currently i have two graphs:

- One shows my TOP 3 for the selected month

- Second one shows TOP 3 for a selected time period, in this case, a year.

 

I want the timeline graph to show the history for the TOP 3 that are selected in the month graph, not the TOP 3 for the sum of all months within the selection. I can't seem to find an exanple of this, how should i do that connection?

 

TL;DR I do not want a monthly TOP 3, i want the whole timeline graph to show top 3 for the selected month.

 

 

  • Hi Anonymous ,

     

    First you need to create a calculated column as below:(from my sample)

     

    rankx = RANKX(SUMMARIZE('Table','Table'[City],"total visitors",SUM('Table'[Vistor])),[total visitors],CALCULATE(SUM('Table'[Vistor]),ALLEXCEPT('Table','Table'[City])),ASC)

     

    Then,put the column to a slicer,and choose 1-3,such as below:

     

    Finally you will see the top3 in your timeline:

     

     

     

    Here is my .pbix file.

     

    Best Regards,
    Kelly

1 Reply

  • v-kelly-msft's avatar
    v-kelly-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    First you need to create a calculated column as below:(from my sample)

     

    rankx = RANKX(SUMMARIZE('Table','Table'[City],"total visitors",SUM('Table'[Vistor])),[total visitors],CALCULATE(SUM('Table'[Vistor]),ALLEXCEPT('Table','Table'[City])),ASC)

     

    Then,put the column to a slicer,and choose 1-3,such as below:

     

    Finally you will see the top3 in your timeline:

     

     

     

    Here is my .pbix file.

     

    Best Regards,
    Kelly