Forum Discussion
Multiple Lines on One Chart
- Anonymous2 years ago
Thanks for the reply from arava and ahadkarimi.
Hi e175429 ,
When using the 2024 PLEA field as the x-axis, it seems to appear as you would expect, but on closer comparison, the data is incorrect.I will provide an alternative method and here are the steps to do it:
1.Create a new table, this table contains unique PLEA column values extracted from 2023 and 2024 (Sheet1):Newtable = SUMMARIZE ( UNION ( SELECTCOLUMNS ( '2023', "PLEA", '2023'[PLEA] ), SELECTCOLUMNS ( '2024(Sheet1)', "PLEA", '2024(Sheet1)'[PLEA] ) ), [PLEA] )2.The relationship between the three tables is created as shown below:
3.Using the PLEA of the newly created table as the x-axis, you can get a line graph with the correct data:
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Zhu
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi ahadkarimi,
Please try again.
2023
https://1drv.ms/x/s!Aop4ARcj8m8hgQTArIQ07rOUmCyd
2024
https://1drv.ms/x/s!Aop4ARcj8m8hgQeMN1GH0X29SBMJ
Thank you kindly
- ahadkarimi2 years ago
Solution Specialist
Hi e175429, thank you for sharing the files. When I connected the two table IDs in the Model view, it showed the lines perfectly in one chart. Do you not want a relationship between the two tables?
- e1754292 years ago
Helper IV
Hi ahadkarimi
I forgot to mention that I also created the relationship by ID.
The problem occurs when I go to line chart by columns PLEA from 2023 and 2024, it doesn't come out right (re: the 3 pictures from my first post).
- Anonymous2 years agoNot applicable
Thanks for the reply from arava and ahadkarimi.
Hi e175429 ,
When using the 2024 PLEA field as the x-axis, it seems to appear as you would expect, but on closer comparison, the data is incorrect.I will provide an alternative method and here are the steps to do it:
1.Create a new table, this table contains unique PLEA column values extracted from 2023 and 2024 (Sheet1):Newtable = SUMMARIZE ( UNION ( SELECTCOLUMNS ( '2023', "PLEA", '2023'[PLEA] ), SELECTCOLUMNS ( '2024(Sheet1)', "PLEA", '2024(Sheet1)'[PLEA] ) ), [PLEA] )2.The relationship between the three tables is created as shown below:
3.Using the PLEA of the newly created table as the x-axis, you can get a line graph with the correct data:
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Zhu
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.