Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
By using set analysis how can we show the top three values in Text Chart,
Glad to help you. Please close the topic with cheking "accept as solution".
Hi,
Tops 3 sales values, you can just use :
=max(Sales)&','&max(Sales,2)&','&max(Sales,3)
Hi Sergio,
Thanks for the info but I need the data by using Set analysis
example if I am calculating in this way I am getting the values =max(Sales)&','&max(Sales,2)&','&max(Sales,3)
but I want to calculate in the below format
(Sum({<Currency = {"Constant"}, Scenario = {"Loss"}, Code = {"12345"}, Year = {"2018","2019","2020"}>}Amount)
-
Sum({<Currency = {"Constant"}, Scenario = {"Gain"}, Code = {"78965"}, Year = {"2018","2019","2020"}>}Amount))/1000000
I want to show the top three regions
Output I need like below
Asia : USD XXXXXX Millions
France : USD XXXXXX Millions
Germany : USD XXXXX Millions
Thanks in Advance
In a text box, try with :
=Concat(aggr(if(rank((Sum({<Currency = {"Constant"}, Scenario = {"Loss"}, Code = {"12345"}, Year = {"2018","2019","2020"}>}Amount)
-
Sum({<Currency = {"Constant"}, Scenario = {"Gain"}, Code = {"78965"}, Year = {"2018","2019","2020"}>}Amount)))<4,Country),Country),', ')
Hi Serigo ,
Still not getting the output
I got the ouput like this:
Germany, France, Asia
But I need the output like
Germany : USD XXXXX millions
France : USD XXXXX millions
Asia : USD xxxxx millions
Please help me with this
You want the ouput in a text box or in a chart?
in the Text box
in the Qlik sense there is a chart name called "A Text & Image" I want the output in this
In a text box , try:
=Concat(aggr(if(rank((Sum({<Currency = {"Constant"}, Scenario = {"Loss"}, Code = {"12345"}, Year = {"2018","2019","2020"}>}Amount)
-
Sum({<Currency = {"Constant"}, Scenario = {"Gain"}, Code = {"78965"}, Year = {"2018","2019","2020"}>}Amount)))<4,Country&' : USD '&
(Sum({<Currency = {"Constant"}, Scenario = {"Loss"}, Code = {"12345"}, Year = {"2018","2019","2020"}>}Amount)
-
Sum({<Currency = {"Constant"}, Scenario = {"Gain"}, Code = {"78965"}, Year ={"2018","2019","2020"}>}Amount))),Country),chr(10))
HI Sergio,
Thanks a lot it is working fine now