Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Data depends on highlight on line chart

Thank you for taking a look. 
I have line chart, each line of which is a measure (Meas Upside, Downside and etc). I can select, highlight one of them (on the attached image it is green one). Question is, can I show value = highlighted measure divided by 3 , in the bottom chart (Meas_Test). Values will be changed depends on the highlight on line chart.


  • Hi Anonymous ,

     

    I create a simple example. Please check:

     

    1. Create another table with your measure names by "Enter data".

     

    2. Combine your multiple measures into one.

     

     

    Measure =
    SWITCH (
        SELECTEDVALUE ( MeasureName[MeasureName] ),
        "Sum Measure", [Sum Measure],
        "Avg Measure", [Avg Measure],
        [Sum Measure] // the default measure when nothing selected
    )
    

     

     

     

    3. Create a line chart.

     

    4. Create a column chart and keep "Title" off.

     

    5. Create a title measure and put it into a card visual, keep "Category" off, adjust font size.

     

     

    Title = 
    VAR Measure_ =
        SELECTEDVALUE ( MeasureName[MeasureName] )
    RETURN
        IF ( ISBLANK ( Measure_ ), "Sum Measure by Date", Measure_ & " by Date" )
    

     

     

     

     

    6. Group the card visual and the column visual.

    (PS: I do this step because title function is not working with "Highlight" in this column chart based on my test.)

     

    7. Test.

     

     

    Best regards

    Icey

     

    If this post helps, then consider Accepting it as the solution to help other members find it faster.

3 Replies

  • Icey's avatar
    Icey
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    I create a simple example. Please check:

     

    1. Create another table with your measure names by "Enter data".

     

    2. Combine your multiple measures into one.

     

     

    Measure =
    SWITCH (
        SELECTEDVALUE ( MeasureName[MeasureName] ),
        "Sum Measure", [Sum Measure],
        "Avg Measure", [Avg Measure],
        [Sum Measure] // the default measure when nothing selected
    )
    

     

     

     

    3. Create a line chart.

     

    4. Create a column chart and keep "Title" off.

     

    5. Create a title measure and put it into a card visual, keep "Category" off, adjust font size.

     

     

    Title = 
    VAR Measure_ =
        SELECTEDVALUE ( MeasureName[MeasureName] )
    RETURN
        IF ( ISBLANK ( Measure_ ), "Sum Measure by Date", Measure_ & " by Date" )
    

     

     

     

     

    6. Group the card visual and the column visual.

    (PS: I do this step because title function is not working with "Highlight" in this column chart based on my test.)

     

    7. Test.

     

     

    Best regards

    Icey

     

    If this post helps, then consider Accepting it as the solution to help other members find it faster.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thank you for such a detailed reply, sir Icey. It looks very optimistic I will check it out and come back to you later. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Icey, it is beautiful, thank you, worked for me.