All,
I need to get the top 10 countries based on revenue for most recent year. I am using topCount function, I dont like to hard code the most recent year. Can you suggest any other way of doing?
Thanks
Here is an example
topCount(set([Camping Equipment],[Golf Equipment],[Mountaineering Equipment]),2,[2013])
I want to replace [2013] with a function that dynamically picks up the current hear. I have tried the head function and it is not working
Data:
2013 2012 2011
Country
India 1000 345 963
Japan 762 999 1962
United States 2000 1124 45
China 567 786 9999
Thailand 10000 9876 1234
In the above example I want it to be sorted on 2013 data. Next Year The first column will be 2014 and I want it to be sorted on 2014 data.
This might not be helpful, but the obvious answer is to get your data modeller / cube builder to create a current year dimension in your cube. There might be a function that you can use, but I'm afraid I don't know what it would be...I'd go back to the design of the cube.
if your cube is designed such that the current year/month/date is the latest member of your time dimension you can use closingPeriod