Page 1 of 1

Create a line in line chart as a sum of two other columns

Posted: Wed Aug 12, 2020 9:42 am
by VladU
Hello,

Could you please help me with the following issue? I have two columns: stat1 and stat2 and I want to create a line chart containing 3 lines: one for stat1, one for stat2 and the third one for the sum of stat1 and stat2.

I cannot figure what is the expression for the addition (sum) of the two stats (I've tried multiple combinations, starting from setting the Value field of the series to {test.stat1 + test.stat2}, but none have worked so far. Also, any pointers on how I would multiple a line by a factor?

I am attaching the .mrt file I am using. Your help would be much appreciated.

Best regards,
Vlad

Re: Create a line in line chart as a sum of two other columns

Posted: Wed Aug 12, 2020 5:22 pm
by Lech Kulikowski
Hello,

You can add an additional calculated column in your data source (stat1+stat2) and then use it in chart.

Thank you.

Re: Create a line in line chart as a sum of two other columns

Posted: Thu Aug 13, 2020 7:46 am
by VladU
Hello Lech,

Thank you for the information. Unfortunately, I've tried doing that and it did not work. Perhaps I am using the incorrect syntax as now, the line chart is not even displayed. I am attaching the file and the syntax I have used.

Best regards,
Vlad

Re: Create a line in line chart as a sum of two other columns

Posted: Sun Aug 16, 2020 8:58 am
by Lech Kulikowski
Hello,

Your expression is not correct. Also, columns should be numeric types for correct result.

Thank you.