Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
sreenivasareddy
Contributor II
Contributor II

Range Avg in Qlikview

Hi Everyone , When i try to Calculate range Avg in gauge Chart , i am not getting desired value , kindly help me.

I am posting data in below ,

1)my field are Name,Score and Sales

2) in second step i done cumulative sum for both Score and Sales as shown  Score_cumulative  and  Sales_cumulative

3)next i divided  Score_cumulative/Sales_cumulative  the qlikview is giving  0.014072848 that means it's giving result of  17/1208.

4) but  my desired(Wanted ) result is range Avg of Column 6 i.e  0.015497469 in Gauge Chart, please help me.

 

NameScoreSalesScore_cumulativeSales_cumulative=Score_cumulative/Sales_cumulative 
   1712080.014072848Qlikview Result
A110011000.01 
B315131510.01986755 
C420142010.019900498 
D245624560.004385965 
E730073000.023333333 
     0.015497469Wanted Result
2 Solutions

Accepted Solutions
sunny_talwar

Try this

Avg(Aggr(Score_cumulativeExpression/Sales_cumulativeExpression, Name, Score, Sales))

or just this

Avg(Aggr(Score_cumulativeExpression/Sales_cumulativeExpression, Name))

View solution in original post

dx_anupam
Creator
Creator

HI Sreenivas,

I am getting correct result using the formula suggested by Sunny. Please find the attached screenshot.

Formula I have used is
=Avg(Aggr((Sum(Score)/Sum(Sales)),Name,Score,Sales))

View solution in original post

5 Replies
dx_anupam
Creator
Creator

Hello Sreenivas,

please click on the table and properties, from the expression select  =Score_cumulative/Sales_cumulative in that change the total mode from Expression total to "Average" of Rows. it will return you desired output.

Please find the attached screenshot for detail.

Regards,

Anupam

 

 

 

sunny_talwar

Try this

Avg(Aggr(Score_cumulativeExpression/Sales_cumulativeExpression, Name, Score, Sales))

or just this

Avg(Aggr(Score_cumulativeExpression/Sales_cumulativeExpression, Name))
sreenivasareddy
Contributor II
Contributor II
Author

Hi Anupam thanks for your response, but it's not working, and one more thing is in gauge chart Total mode is disabled,

find the attached screenshot.

sreenivasareddy
Contributor II
Contributor II
Author

Hi sunny_Talwar, thanks for your Response ,i tried with your suggested expression ,but i am getting strange results, please find the attached screenshot.

dx_anupam
Creator
Creator

HI Sreenivas,

I am getting correct result using the formula suggested by Sunny. Please find the attached screenshot.

Formula I have used is
=Avg(Aggr((Sum(Score)/Sum(Sales)),Name,Score,Sales))