Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
saumyashah90
Specialist
Specialist

LINEST_M function set analysis help

Hi All,

I have

=if(LINEST_M(Metric_Value,Dt)>=0,LINEST_M(Metric_Value,Dt))

I have StartDate and EndDate Variable and i want above expression with start date and enddate in it.

How can i do that.

Dt is my Date column

4 Replies
saumyashah90
Specialist
Specialist
Author

any 1?

swuehl
MVP
MVP

Try something along these lines

LINEST_M({<Dt = {">=$(StartDate)<=$(EndDate)"}>} Metric_Value,Dt)

assuming that your variables are formatted to match the format of your Dt field values.

saumyashah90
Specialist
Specialist
Author

Yeah i tried this before also,

But when i change dates in calendar,

out put doesnt change

swuehl
MVP
MVP

I assume it's just a formatting issue, i.e. the format of your variables.

Try

LINEST_M({<Dt = {">=$(=Date(StartDate,FORMATCODE))<=$(=Date(EndDate,FORMATCODE))"}>} Metric_Value,Dt)

where you need to replace FORMATCODE with an appropriate format code to match format of field Dt, e.g. 'YYYY-MM-DD', or post a small sample that demonstrates your issue.