Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Uploads getting stuck in the virus scanner. We are investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor II
Contributor II

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
Highlighted
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.

Highlighted
Contributor II
Contributor II

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

Highlighted
Specialist III
Specialist III

You are welcome.

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

Highlighted
Contributor II
Contributor II

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.

Highlighted
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

Highlighted
Contributor II
Contributor II

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.

Highlighted
Specialist III
Specialist III

You are welcome.