Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

maxsheva
Contributor

Regression line issue

Hi,

Please help to find correct solution for regression line.

I have data where dimension is not numerical.

I decided to use Dual for that. But as result after script works it has not all numbers one by one.

Regression line shows incorrect results in this case.

Assume please 'Name' field as result of Dual function.

LOAD * INLINE [

Name, ValueID

1, 2

2, 6

4, 8

];

Thx.

6 Replies
MVP
MVP

Re: Regression line issue

What is the output you are looking for?

maxsheva
Contributor

Re: Regression line issue

I need the same regression line as QV auto creates it.

The issue I can't reach correct numbers (one by one) in dimension 'Name'

It depends on data model which has specific requirements.

I'd like to find correct Linest_M and Linest_B when dimension numbers are 1,2,4 instead 1,2,3

MVP
MVP

Re: Regression line issue

And are you saying that the correct values are 3 for Linest_M and 2.3333 for Linest_B? (Instead of 1.86 and 1)?

maxsheva
Contributor

Re: Regression line issue

Sunny pls look at this qvw file.

When I include option 'Continuous' on the Axis tab it shows the same as table.

But in this case dimension shows only numeric values instead text from Dual.

So I can say formula probably correct but visualization is not as expected if use only text dimension in chart.

MVP
MVP

Re: Regression line issue

I guess what you are saying makes complete sense.... but is there something you would want to change? I am trying to figure out what you are expecting to see and where?

maxsheva
Contributor

Re: Regression line issue

I'd like to get visualization with only text(Names) as dimension and true(straight) regression line.

As far as I see I need fill Linest_M and Linest_B with numeric 'Name' field where count should be (1,2,3) instead (1,2,4)

Probably I don't need use 'Name' field in Linest_M and Linest_B. But RowNo() function doesn't give correct result.

Community Browser