i have GDP data with colunms : Country, GDP, Year.
i used a Dax functions to calculate GDP Growth %, and ranked it In the Growth Rank Column.
Here's what i want to do :
I want to show the Year of highest Growth % in a Card Visual (from the Table, it shows 1981), but can't seem to know how best to do it.
This is a table visual i created on power bi.
Apart from Year and GDP Column every other Column is calculated using DAX.
Here are the formulas :
LY GDP =
var _Ly = LASTNONBLANK('Countries GDP 1960-2020'[Year],1) - 1
var _1 = CALCULATE([GDPc], ALL('Countries GDP 1960-2020'[Year]),
'Countries GDP 1960-2020'[Year] = _Ly )
Growth % = DIVIDE((sum([GDP]) - [LY GDP] ),[LY GDP])
Growth Rank = RANKX ( ALL ( 'Countries GDP 1960-2020'[Year] ),[Growth %] )
I have Gotten tremendious support from here, and i appreciate your responses.