Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Remco
Contributor III
Contributor III

Aggregate issue within linest_b function

Hello all, 

I am not able to get the right result for the linest_b and it has to do with the weighted average. When I am using

round(linest_m(total aggr(round(avg (GROUPPERFORMANCE / UNITS),0.001),YEARSALES),log(YEARSALES)),0.0001)

it works but the problem is that I don´t want the 'GROUPPERFORMANCE / UNITS', instead of this I want this to be 'SUM(GROUPPERFORMANCE) / SUM(UNITS)' . This gives no result. It probably has to to with the aggr which I don not control completely yet. How can I get this to work? Any suggestions?

 

Thanks a lot?

Labels (1)
1 Reply
Remco
Contributor III
Contributor III
Author

I think I just found my own answer 🙂 It seems that

 

round(linest_m(total aggr(round(sum (GROUPPERFORMANCE) / sum(UNITS),0.001),YEARSALES),log(YEARSALES)),0.0001)

 

works well