Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

how to set dynamic target line

Hi, How can I set the target line dynamically? For example, when I select Product A, the target line and data points color follow target 70% while for Product B, the target line and data points co...
  • Anonymous's avatar
    Anonymous
    6 years ago

    HI Anonymous,

    Your formula seems already summarized rates, so it get the wrong result(overly 0.7) when I try to aggregated them.
    You can try to use the following measures to confirm if it meets your requirement:

    Line Color =
    VAR currProduct =
        SELECTEDVALUE ( 'Table'[Product] )
    RETURN
        IF (
            currProduct = "A",
            IF ( [Rate] > 0.8, "Green", "Red" ),
            IF ( [Rate] > 0.7, "Green", "Red" )
        )
    

    Regards,

    Xiaoxin Sheng