Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone;
I hope you are all doing good.
Well, I have a ranking variable (input variable) which limit the number of values displayed in the bar graph; for example:
if the user enter X (X is an integer) in this ranking variable; only X countries will be displayed in the graph.
My question is : how can I get these values (X country displayed) to use them as a filter in another expression.
Thank you in advance for your help.
One simple solution,
SET vRank=200;
tab1:
LOAD [Country or territory],
"IMF[1]"
FROM
[https://en.wikipedia.org/wiki/List_of_countries_by_GDP_(nominal)]
(html, utf8, embedded labels, table is [GDP (US$ million) by country])
Where IsNum("IMF[1]")
;
tab2:
NoConcatenate
LOAD RowNo() As Rank, *
Resident tab1
Order By "IMF[1]" Desc
;
Drop Table tab1;
Dimension:
=If(Rank<=vRank,[Country or territory])
Expression:
Sum("IMF[1]")
One simple solution,
SET vRank=200;
tab1:
LOAD [Country or territory],
"IMF[1]"
FROM
[https://en.wikipedia.org/wiki/List_of_countries_by_GDP_(nominal)]
(html, utf8, embedded labels, table is [GDP (US$ million) by country])
Where IsNum("IMF[1]")
;
tab2:
NoConcatenate
LOAD RowNo() As Rank, *
Resident tab1
Order By "IMF[1]" Desc
;
Drop Table tab1;
Dimension:
=If(Rank<=vRank,[Country or territory])
Expression:
Sum("IMF[1]")