Hi all,
Lets say I have export data by country and year, however as the new annual data come in every year, top exporting country by the latest year changes. How do I have my line graph automatically update so that the new top N countries are automatically changed based on latest year data and the graph chooses these countries, replacing last year top exporting countries?
Hello Tuan,
Try to add a calculated field with index().
then for filtering top N rows use the following calculation and place it in filter box making it as context filter.
index()<=(Number of rows you want to show 'N'.)
Sort the Countries using that measure in descending order.
Let me know if it works out for you.
Become a Viz Whiz on the Forums! Support the Community and master Tableau.