Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
microwin88x
Creator III
Creator III

Add Fixed Trend Line to Combo Chart with 2 Dimensions

Hi,

I have the following Combo Chart:

1.png

With Dimensions: Grades and Customers

And Expression: SUM(Sales_RND)

What I need is to add the Lineal Trend where Y = m X + B like this (but not automatically):

2.png

I'd need to add it as a new expression... I already have the values for M and B, calculated like this:

- M = LINEST_M({1}TOTAL AGGR(SUM({1}Sales_RND),GRADE,Customer),GRADE,Customer)

- B = LINEST_B({1}TOTAL AGGR(SUM({1}Sales_RND),GRADE,Customer),GRADE,Customer)

I've seen somewhere that I'd have to add a new expression to get the Lineal Trend with something like this:

LINEST_M({1}TOTAL AGGR(SUM({1}Sales_RND),GRADE,Customer),GRADE,Customer)

*GRADE

+LINEST_B({1}TOTAL AGGR(SUM({1}Sales_RND),GRADE,Customer),GRADE,Customer)

The thing is it's not working, I don't know if it's because I have to multiply the LINEST_M with my 2 Dimensions? (GRADE and Customers). How could I do that in order to work and avoid using 2 charts overlapped? I attach the QVW.

Thanks!!!

4 Replies
Anil_Babu_Samineni

Can you enable the option Linear from section from Trendlines.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
microwin88x
Creator III
Creator III
Author

Hi,

No because I need to create a customized Trend Line, not the one by default...

Anil_Babu_Samineni

Okay, But when i enable second expression looks like i got three trend curves. But, You are expecting one curve only. What does the one curve indicates when we use custom formula like you mentioned?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
microwin88x
Creator III
Creator III
Author

That curve would be the general Trend Line for all the dots, it aggregates the sum from sales for every grade and customer and it has to be a fixed value, that's why you see the {1}.

I'd be satisfied for now if I could only draw the line as an expression for now (and then I would change the line color, let it fixed ignoring selections, or using show conditional function).