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: 
rkpatelqlikview
Creator III
Creator III

LINEST_M function for Month

Hi All,

I used this Linest_function for week. Its working properly.

The same function is used for MOnth analysis.

But there is a bug. Can any one please suggest on this?

Am attaching the QVW.

Thanks in advance..

1 Solution

Accepted Solutions
sunny_talwar

Try this... when you have Month selected....

=LINEST_M({<[Safety Category] ={'Green'}, Month= {">=$(=MAX(Month)-5)"}>}Aggr(Round(Sum({<[Safety Category] ={'Green'}, Month= {">=$(=MAX(Month)-5)"}>}[Kms Travelled])/sum({<Month= {">=$(=MAX(Month)-5)"}>}[Kms Travelled])*100),Month), Month)

View solution in original post

12 Replies
sunny_talwar

Try this... when you have Month selected....

=LINEST_M({<[Safety Category] ={'Green'}, Month= {">=$(=MAX(Month)-5)"}>}Aggr(Round(Sum({<[Safety Category] ={'Green'}, Month= {">=$(=MAX(Month)-5)"}>}[Kms Travelled])/sum({<Month= {">=$(=MAX(Month)-5)"}>}[Kms Travelled])*100),Month), Month)

rkpatelqlikview
Creator III
Creator III
Author

Hi Sunny,

Thanks for your great support. It's correct

rkpatelqlikview
Creator III
Creator III
Author

Hi Sunny,

There is a small doubt on this. Again

there is 2 conditions:

1) If the values all are '100%' for all the weeks the "Top Green Arrow symbol should be visible.

2) If the values all are '0%' for all the weeks the "Bottom Red Arrow" symbol should be visible.

As per Linest function the symbol is different on above conditions. But these 2 conditions should be satisfied.

Where i can use this 'IF' Condition.?

sunny_talwar

I am not sure I follow, may be because the discussion has been 1 month old... do you mind expanding with images as to what is not right?

rkpatelqlikview
Creator III
Creator III
Author

Thanks for your response Sunny.

Here am attaching the QVW file where the exact scenario.

It's not wrong which you have suggested. There is a two condition to be satisfy in my linest.

Where i need to write the condition?

In Attached QVW the values are '0' then the symbol should be Green Thumbs up symbol.

IF the all values are '100' then the symbol should be Red Thumbs up.

Thanks in Advance.

sunny_talwar

I am not 100% sure... but for green thumbs up... layout condition =vha=0.... for red thumbs down =vha=100

rkpatelqlikview
Creator III
Creator III
Author

thanks for your support Sunny.

I will check with if condition in layout

in Red symbol ->   IF(vha=100,vha>0,0)

In Green symbol ->  IF(vha=0, vha<0,0).

Please suggest if am wrong.. thanks in advance.

sunny_talwar

I am not sure I follow your question to be able to answer if what you have is correct or not... may be try it out and see if it works or not

rkpatelqlikview
Creator III
Creator III
Author

Sure Sunny. thank you