Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
canmarroig
Partner - Creator
Partner - Creator

Gauge chart: how to set min e max depending on cycle dimension

Hi, i've a total quantity of products i want to represent on a gauge chart depending on a cycle group:

- Agent

- Sales manager

- Area manager

I've tried to settle a MAX like this

=max(aggr(sum(QUANTITY),SALES_MANAGER)) but when a cycle my dimension on agent, it doesn't report their efforts in the right way.

The same for the MIN. Is anybody able to give me a suggestion about this.

Tks

8 Replies
Jason_Michaelides
Luminary Alumni
Luminary Alumni

Try:

=Max(Aggr(Sum(Quantity),GetCurrentField("YourCyclicGroupName")))

Hope this helps,

Jason

canmarroig
Partner - Creator
Partner - Creator
Author

Sorry, I',ve made a mistake, this formula gives me a error of bad min or max in the gauge. It looks like it doesn't recognize the cycle group

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Can you be more specific?  Or better still please post your app.

canmarroig
Partner - Creator
Partner - Creator
Author

Expression to calculate quantity, is this:

sum({<FG_NRT={'N'}>} QUANTITY) where set analyis FG_NRT is only to extract consolidated value, in the min and max i have:

MIN= 0

MAX= max(aggr(sum({<FG_NRT={'N'}>} QUANTITY),GetCurrentField("Area Analisi")))

i've tried also changing Area Analisi in Area_Analisi but no success

Jason_Michaelides
Luminary Alumni
Luminary Alumni

What value are you getting for Max and what do you expect?  try removing current selections in your Aggr():

= max(aggr(sum({1<FG_NRT={'N'}>} QUANTITY),GetCurrentField("Area Analisi")))

canmarroig
Partner - Creator
Partner - Creator
Author

Neither previous nor this, it seems that the only way to solve the error is to calculate aggr for all the members of my cycle group excluding the min (agent) and max (area manager) aggregation

=Max(aggr(sum({<FG_NRT={'N'}>} QUANTITY), Sales manager))

Tks

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Seriously, if you post a sample application it is much easier for us to help you.  I'm what you want can be achieved.

canmarroig
Partner - Creator
Partner - Creator
Author

Give me more time to post the sample, i'm very interested to solve this problem in a smarter way. Tks