Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a table.
Category | Point | Score | Date |
---|---|---|---|
North | a | 7 | March 20, 2014 |
North | a | 6 | March 21, 2014 |
North | a | 5 | March 22, 2014 |
North | b | 7 | March 20, 2014 |
North | b | 9 | March 21 2014 |
North | b | 4 | March 22 2014 |
South | c | 3 | March 20, 2014 |
South | c | 5 | March 21 2014 |
South | c | 7 | March 22 2014 |
South | d | 8 | March 20 2014 |
South | d | 9 | March 21 2014 |
South | d | 7 | March 22 2014 |
I want to create a line chart in which I want to show the date wise score of all the point in a particular category when user selects that category. For example
If user selects North, he should see the trend for point a and b in the line chart.
If user selects South, he should see the trend for point c and d in the same chart.
Please help.
Thanks
Like this?
Like this?
I'm not sure what you mean by trendlines. Are those simply the lines themselves or the lines you get when you enable for example the linear option under Trendlines (on the Expressions tab). See attached example
Hi Manish,
Thanks for your reply. It exactly meets my requirement. But can you explain why are you using sum function?
HI,
The chart you provided is correct. Please explain the use of sum() function.
Hi,
If there are many values for a particular combination of dimension then it will result you in "Null". If use sum around that field name then it will add up and show you the consolidated value for that combination.
Hi Ankit,
You need to use Aggregate functions like Sum, Count etc in Expressions to the get value by the dimensions. For single date and point you have multiple scores, if you want to get by Date and Point then you have to use Sum(Score) and use the dimensions date and point. Sum() is similar to Group by in SQL
SELECT
date,
point,
Sum(score)
FROM TableName
Group By date, point;
Hop this helps you.
Regards,
Jagan.
Thanks everyone.
SUM is used considering the possibilities that there could be more than one different score for same category, point and date combination...