Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to show recent a 3 months regression line in a 12 months bar chart

How to set up a regression line or trend line show the recent 3 months in a 12 months bar chart?

In particular, below graph show me all possible 12 months, but I only want to take show 3 months trend line? What is the possible solution?

linest_m(total aggr(if(sum([Cash_Payments]),sum([Cash_Payments])),Month),Month)*              

+linest_b(total aggr(if(sum([Cash_Payments]),sum([Cash_Payments])),Month),Month)

I tried changing only({3}Month, but the regression won't show up anymore if it changes. Please help.

Capture1.GIF

16 Replies
sinanozdemir
Specialist III
Specialist III

Hi Bill,

I didn't realize this was a QlikSense question so I re-did the app in QlikSense. I am attaching the qvf and hope it helps.

Anonymous
Not applicable
Author

Hi Sinan. It is really helpfully. It resolved my questions perfectly. You are the Black Belt in Qlik. Thank you so much.

sinanozdemir
Specialist III
Specialist III

You are welcome.

Maybe a purple belt, but definitely not a black belt yet

Anonymous
Not applicable
Author

sinanozdemir  Hi Sinan. Let say if I want to take a 6 months median for calculation, I am having difficulties in return monthly value? For example, January number in cash payment minus 6 month median in cash payment, February number minus median, March number minus median, and so on. After all, each site value show up in a bar graph. Thanks for your genius mind.

sinanozdemir
Specialist III
Specialist III

Hi,

Are you trying to use the median for the first six months? I used the first six months, let's see if this helps you.

Capture.PNG

In the attached app, look at the Median sheet.

Thanks

Anonymous
Not applicable
Author

sinanozdemir  Yes. That's the app I want to build. Thank you again. That means a lots for a new user like me in the community.

sinanozdemir
Specialist III
Specialist III

You are welcome.