Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Top 10

Hi All,

I have a data set with list of documents viewed across all the country for the last 6 months. 

 

I am needing to show the top N most viewed documents for each country month over month. 

 

The output is this:

Please let me know how could I achieve this in PBI. 

 

Thanks!

1 Reply

  • Anonymous , You can use Window function, assume views is a meausre

     

    calculate([Views], window(1,abs,10,abs, allselected(Table[Month], Table[Country], table[Doc 1]) , ORDERBY(table[Doc 1]) , , PARTITIONBY(Table[Month], Table[Country) ) )

     

    Simple TOPN on doc should also do

    Dynamic TOPN using TOPN/Window and Numeric parameter: https://youtu.be/vm2mdEioQPQ