Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Line Chart - show series only when one item selected

Hi All,

 

I am trying to plot a series of data in a line graph that only shows when I'm focussed on an individual event.

I found this post - Visualisations blank until something selected in a slicer to be very helpful and I feel like I'm 99% there.

 

The trouble I'm having is when I haven't selected an event, the series (Places (M)) plots a count on a few of the dates, I believe this is because there is only one event present on that date.

 

I've tried a few combinations of the formula in the link, also using SELECTEDVALUE. Can anyone help me with correct method of filtering to ensure Places are only given when I explicitly select a single event only?

 

 

 

  • Hi Anonymous,

     

    Try this measure, please. You don't need to change the "Cross Filter Direction" this time.

     

    Places (M) 2 =
    IF (
        ISFILTERED ( Courses[campaignid] ),
        SELECTEDVALUE ( Courses[Maximum Attendees] ),
        BLANK ()
    )
    

     

    Best Regards,
    Dale

9 Replies

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi Anonymous,

     

    Can you share a sample, please? Because we need the model structure. How does the event connect with these columns? Is [Places(M)] a measure?

     

     

    Best Regards,
    Dale