Forum Discussion
Line Chart Legend is not working Dynamically
- Anonymous1 year ago
Hi VijayAntonyM ,
Have you filtered the products individually in each product measure? For example: Table [Product] = "Product 1". If my assumption is right, then as danextian said, you just need to create two measures and then use the Product column as Legend, the line chart will automatically show Committed and Delivered for each product, and the Product Filter will work as well.
Here is an example for your reference.
My data
2024/1/1 10 A 2024/2/1 15 A 2024/3/1 26 A 2024/1/1 16 B 2024/2/1 5 B 2024/3/1 18 B The _sum measure.
sum_ = CALCULATE(SUM('Table (2)'[Sum]),MONTH('Table (2)'[Date])=MONTH(MAX('Table (2)'[Date])))When I selected A in Filter, the line chart showed A product.
The premise of this solution is that the Committed and Delivered of each product are calculated in the same way. Why do you think this solution does not work? Could you please provide more details, such as DAX, screenshots or pbix file? That will help us provide solutions.
——————————————————————————————————————————————————
If my answer helps you solve the problem, please accept my answer as a solution and let it be seen by more people in need.
Best regards,
Mengmeng Li
Hi VijayAntonyM
When you add multiple measures to a line chart, those measures become the legends. If you want to use a column, add a single measure and use that column as a legend.
Actually we need to have 2 measures (committed and delivered accordingly) against products, you solution is not possible on the line chart,