cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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?

 

Image_01.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft v-jiascu-msft
Microsoft

Re: Line Chart - show series only when one item selected

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

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

9 REPLIES 9
Microsoft v-jiascu-msft
Microsoft

Re: Line Chart - show series only when one item selected

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

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Re: Line Chart - show series only when one item selected

Hi @v-jiascu-msft,

 

Sorry for slow reply.

I've made a sample. Yes Places (M) is a measure.

 

https://drive.google.com/open?id=1tVQKBv9T7eCx1A5eUDIV4LfTmaDrD7BX

 

Appreciate your help.

Microsoft v-jiascu-msft
Microsoft

Re: Line Chart - show series only when one item selected

Hi @Anonymous,

 

Based on your model, you just need to change the "Cross Filter Direction" to Single. It will work. Please refer to the snapshot below. 

Line-Chart-show-series-only-when-one-item-selected

 

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Re: Line Chart - show series only when one item selected

@v-jiascu-msft

 

Thank you, yup that certainly gets the Places line functioning as I'd hoped, but the time axis is now behaves incorrectly.

It should/was showing from creation date of first associated booking until the last for the selected course. Now it appears to be selecting the first and last for the entire table??

 

Microsoft v-jiascu-msft
Microsoft

Re: Line Chart - show series only when one item selected

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

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

Re: Line Chart - show series only when one item selected

@v-jiascu-msft

 

That works in the example but not in my actual model.

I will see if I can figure out why, if only my brain worked as well as yours!

Microsoft v-jiascu-msft
Microsoft

Re: Line Chart - show series only when one item selected

Hi @Anonymous,

 

I attached the file in the attachment. You can download it and find if something is wrong.

 

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Re: Line Chart - show series only when one item selected

@v-jiascu-msft

 

I got it!

 

I wasn't using [campaignid] in my actual model as I'm using a sensitive field not included in the example.

I simply changed the ISFILTERED reference to the appropriate column and it's now working 100% as I'd intended.

 

Thanks very much for your help, it's really great to not only have this as a resource but to receive such prompt replies!

Microsoft v-jiascu-msft
Microsoft

Re: Line Chart - show series only when one item selected

It's my pleasure. I'm glad you can benefit from the community.

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors (Last 30 Days)