Forum Discussion

VijayAntonyM's avatar
VijayAntonyM
Helper I
1 year ago
Solved

Line Chart Legend is not working Dynamically

Hi Team,   Good day   I have created Line Chart for 2 measures which are Committed and Delievered against some Products and Date columns as below,   X-Axis- Release Date Y-Axis- Product and th...
  • Anonymous's avatar
    Anonymous
    1 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