Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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

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
v-jiascu-msft
Employee
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

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

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.

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

@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??

 

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.
Anonymous
Not applicable

@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!

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

@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!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.