Jump to content

Line chart for current year and previous year data


Shri G

Recommended Posts

Just color by year

Here is an example data set

Date,Sales,Product
2022-11-10,1749,A
2021-08-09,1672,C  
2022-05-19,7134,B
2022-03-11,3104,B
2020-12-31,3392,C
2021-07-04,1329,C
2022-01-22,5334,B
2020-09-17,4844,A
2020-11-06,2703,C
2022-10-11,3101,C
2022-04-15,1591,B
2021-03-31,8809,B
2020-09-20,6996,C
2020-08-16,2275,B
2022-07-23,2537,B
2020-12-08,5647,C
2022-06-11,2661,A
2021-05-31,6689,C
2021-01-20,5805,B
2022-09-12,2644,C
2022-08-14,4537,C
2021-06-09,3133,B
2020-11-29,1649,A
2020-10-04,4759,C  
2021-09-11,7564,C
2020-07-30,4454,B
2021-04-25,2911,B
2021-02-16,2776,A
2022-03-22,1783,A
2022-02-18,6905,C
2021-12-28,2257,C
2020-08-23,6987,B
2020-07-07,1491,C
2022-05-08,4818,B
2021-10-24,6948,A
2020-09-02,6542,C
2020-08-04,2943,A  
2022-04-01,8321,C
2022-01-28,3260,B
2020-10-15,4447,B
2020-07-17,1840,C
2020-09-26,1566,B
2021-02-05,4156,C
2020-12-16,6995,A
2021-03-17,3856,A
2020-11-12,5116,B
2020-10-21,8061,C
2021-04-15,1895,C
2022-02-07,7166,B
2020-08-31,5736,C
2020-12-24,6997,B
2021-01-03,4438,C
2020-11-02,1491,B
2021-07-17,2655,A
2020-10-29,6118,B
2020-09-08,2250,B
2021-05-22,6948,C  
2022-06-26,5381,C
2022-05-30,3892,B
2021-02-26,1442,C
2020-12-20,4621,B
2020-11-21,2355,C
2020-10-09,6135,A
2022-04-07,2404,B 
2020-09-05,2970,C
2020-08-10,4908,B
2020-07-24,6114,C
2022-03-02,4412,A
2021-12-13,5729,A
2021-11-08,6267,B
2021-10-04,4014,C
2021-09-01,4866,B
2021-08-03,5335,C
2021-07-07,7306,C
2021-06-12,1557,A
2021-05-17,6905,B
2021-04-23,2943,C
2021-03-29,1749,B
2021-02-03,5796,B
2021-01-08,3895,A
2020-12-13,4052,C
2020-11-18,5400,B  
2020-10-24,5477,C
2020-09-29,1628,A
2020-08-04,4700,B

and here is the output

sales_product_year.thumb.png.5cbfab88ccd25174025f55c5db92b6db.png 

Is this what you were envisioning?

Link to comment
Share on other sites

Hi @Jose Leviaguirre​ 

I am expecting the same but it is now working for me.

Sample Data: I have this cross table.

Total Record: Distinct Records

Status Y : Distinct Records when [Flag]=Y

Status Y%: Status Y/Total Unique Records

For each record there a specific date and now I have to display the trend for year for Status Y%

image.thumb.png.a8eedfcebab64e4681f7b5aa904ffe52.pngWe should be able to see year and previous year values. For each year a separate line should be there( as shared by you)

X axis: Year

Y axis: Status Y%

I tried as you suggested but can see only markers for years. I am not sure if this is the only way as I don't have that much knowledge. Will be needing your help again 😀

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...