Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

[Sense] get value of first articel in chart

Hi com,

is it possible to get the value(sales in measure) of the first articel(product in Dimension) into a seperat KPI or textfield, etc.

So u have for example a barchart with the sales of the top 5 countries. And u want to show the value of country Top1 in an extra object.

Thx for ur help in advance

1 Solution

Accepted Solutions

Re: [Sense] get value of first articel in chart

Or if you looking to get the Max sales value it self, you can try this:

Max(Aggr(Sum(Sales), Country))

View solution in original post

8 Replies

Re: [Sense] get value of first articel in chart

Sure, to show the name of the country, you can do something like this:

FirstSortedValue(Country, -Aggr(Sum(Sales), Country))

Re: [Sense] get value of first articel in chart

Or if you looking to get the Max sales value it self, you can try this:

Max(Aggr(Sum(Sales), Country))

View solution in original post

Not applicable

Re: [Sense] get value of first articel in chart

Thx for ur answer Sunny,

i know how to calculate it, that how i got the chart to give me this values. But i want the values directly from the chart so i dont have complications with wrong values. Also I try this because i want to add pics ito the kpi instead of the value to show the product pic for the first, seond highest product and so on!!!

Re: [Sense] get value of first articel in chart

I am not sure what you mean directly from the chart? If you are using the expression (not something which is hard coded) which should give you the same value as your chart, is that not similar to pulling the value from the chart?

Not applicable

Re: [Sense] get value of first articel in chart

yep its similar but i wanted it to be saver xd

thought about something like getMeasure(0) from object x

Re: [Sense] get value of first articel in chart

saver xd? not sure I understand that.

Not applicable

Re: [Sense] get value of first articel in chart

i just wanted to get it from the chart then calc it again. but okay!

im trying to get it to work with pics now

Re: [Sense] get value of first articel in chart

Not sure if this function is available in Qlik Sense or not and if it will work here or not, but there is a function called GetObjectField() in QlikView. This might have done what you wanted, but you will have to play around with it to be sure