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 Anonymous
When I try it I get the following error:
"The expression refers to multiple columns. Multiple columns cannot be conevrted to a scalar value."
Hi e175429,
I'm sorry about this. I created a new table, are you doing the same as me? You can click on the link below to see where the error is occurring:DAX Error: The Expression Refers to Multiple Columns. Multiple Columns Cannot Be Converted to a Scalar Value. - SQLGene Training and if the problem persists, please give me a detailed description and I will be able to better solve your problem.
Best Regards,
Zhu
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
- e1754292 years ago
Helper IV
Hello,
Sorry, the mistake was mine I was doing it wrong.
Thank you very much, your suggestion gave me what I was ooking for.
So, moving forward, as time goes on, i'll have more years to compare. This is what I'll have to o each time for each column from different tables I want to compare? I don't understand why BI didn't just map the data points initially, instead of having to create a whole new table.