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

How to calculate slope (line_m()) from expression

Dear All,

How can I calculate Slope for the table in the "sample.qvw"?

My alternative way is:

- I extract the data from the table "Extraction" from "sample.qvw"

- Then calculate the slope in the "Trendline.qvw"

However, I don't want to do that, I want to do it in "sample.qvw". Is it possible?

Thanks,

Dong

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Perhaps you're looking for this:

LINEST_M(aggr( sum(#Cust.),Month,Provinces) ,match(Month,'Jan','Feb','Mar','Apr','May','Jun'))


talk is cheap, supply exceeds demand

View solution in original post

7 Replies
Gysbert_Wassenaar

Yeah, you can create the same line chart in the Sample.qvw document.

If you want to calculate the slope then you can use

=LINEST_M(aggr(sum(#Cust.),Month) ,match(Month,'Jan','Feb','Mar','Apr','May','Jun'))


talk is cheap, supply exceeds demand
Not applicable
Author

Your formula only works when specific province is chosen. When in the clearance mode, there is no data shown.

Could you please check again?

Gysbert_Wassenaar

Works fine here.


talk is cheap, supply exceeds demand
Not applicable
Author

Hi,

Can you please send me your file?

My file cannot show as below pictureSlope.PNG

Gysbert_Wassenaar

Perhaps you're looking for this:

LINEST_M(aggr( sum(#Cust.),Month,Provinces) ,match(Month,'Jan','Feb','Mar','Apr','May','Jun'))


talk is cheap, supply exceeds demand
Not applicable
Author

That's what i am looking for.

oknotsen
Master III
Master III

If your question is now answered, please flag the Correct Answer (via the big "Correct Answer" button near every post).

If not, please make clear what part of this topic you still need help with .

May you live in interesting times!