# QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

## RangeAvg is not working

What is wrong in this formula? I couldnt get the average

RangeAvg(Above(sum([\$(vCurrency) Satış]) / (sum([KG Satış]))*1000,0, 12))

1 Solution

Accepted Solutions
Not applicable

## Re: RangeAvg is not working

Hi guys,

I forgot uncheck the accumulate option, thats why i couldnt get the average.

Thanks for replies.

7 Replies
Esteemed Contributor III

## Re: RangeAvg is not working

Can you share a sample app to look into? And what is Satis here, is that a field name ?

MVP

## Re: RangeAvg is not working

What are you getting and what do you expect to get?

Not applicable

## Re: RangeAvg is not working

Hi,

Green numbers must be same with the green bar chart.

And gray number must be same as gray bar chart.

Formula for bar chart is; RangeAvg(Above(sum([\$(vCurrency) Satış]) / (sum([KG Satış]))*1000,0, 12))

Formula for table is; rangesum( before( sum([\$(vCurrency) Satış]),0,NoOfColumns(TOTAL) ) ) / rangesum( before( sum([KG Satış]),0,NoOfColumns(TOTAL) ) )/1000

Nisan                       Mayıs                                 Haziran

MVP

## Re: RangeAvg is not working

The formula are not exact match of each other. There are a lot of differences between the two formulas. I can propose something, but not 100% certain it will work... try this in the bar chart

RangeSum(Above(Sum([\$(vCurrency) Satış]), 0, NoOfRows(TOTAL)))/RangeSum(Above(Sum([KG Satış]), 0, NoOfRows(TOTAL)))/1000

or

RangeSum(Above(Sum([\$(vCurrency) Satış]), 0, RowNo(TOTAL)))/RangeSum(Above(Sum([KG Satış]), 0, RowNo(TOTAL)))/1000

If they do not work, would you be able to provide a sample to look at what is going on?

Best,

Sunny

Not applicable

## Re: RangeAvg is not working

I tried but it doesnt work.

I couldnt provide a sample bc its a company document, all .qvw's are classified info

MVP

Not applicable

## Re: RangeAvg is not working

Hi guys,

I forgot uncheck the accumulate option, thats why i couldnt get the average.

Thanks for replies.