Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I want to draw a linear regression line , here are the details:
my dimension is: if (([Classe Q206])<>'NC/NSP',[Q206])
and my measure is: Count(Q801a)/COUNT(TOTAL(Q801a))
can you please tell me what is the formula to draw my linear regression line ?
i tried many formulas, but I didn't manage to do it
thank you in advance
May be this
Linest_M(TOTAL Aggr(Count({<[Classe Q206]) -= {'NC/NSP'}>} Q801a)/Count(TOTAL {<[Classe Q206] -= {'NC/NSP'}>} Q801a), [Q206])) * [Q206]
+
Linest_B(TOTAL Aggr(Count({<[Classe Q206]) -= {'NC/NSP'}>} Q801a)/Count(TOTAL {<[Classe Q206] -= {'NC/NSP'}>} Q801a), [Q206]))
thank's a lot for your reponse, but it doesn't work either
Do you mind elaborating? What exactly do you mean when you say it doesn't work? Does it give 0? does it give an error? Does it not give you the line you expect to see? What exactly is wrong?
first it gives an error about the expression, then i removed the brackets after [classe Q206], after that the expression was OK, but it doesn't give the regression line, it gives nothing.
Would you be able to share a sample so that we can see the issue?
can you please explain what do you mean by sample ?
Lol sample can mean a lot of things 😉. Just kidding.
All I am asking is for you to share something where I can see what you have and test the expression I gave and see it not working and then try to make few changes to see what works. Without knowing/seeing your data, it is difficult to give you a perfect expression which will work right away. So, it would be nice if you can share qvw/qvf.
I hope I make sense now?
i think it's clearer now lol 🙂
here is the data used to make the scatter plot, hope it what you asked for