Qlik Community

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
vishsaggi
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 ?

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


1.PNG

     Nisan                       Mayıs                                 Haziran

2.PNG

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

Re: RangeAvg is not working

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.

Community Browser