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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
kyle_hermann
Frequent Visitor

Slicer Date Interaction with Line Chart

I have this line chart below, all my data is correctly presented with data from Jan 1 to today:

 

Capture2.PNG

Capture1.PNG

 

 

However, when I change the slicer to February 1, I get the graph below:

 

Capture3.PNG

 

It's because of the date filter for the line chart in the picture shown below. I have January selected, so January continues to be displayed on my line graph as 100% yellow line.

 

Capture4.PNG

If I select all the dates, or none of the dates, I am left with:

 

Capture5.PNG

 

 

I was wondering if it would be possible to hide dates that are not selected with the slicer. The slicer is interacting with other elements on the page so it isn't really ideal or realistic to show the year to date at all times.

1 ACCEPTED SOLUTION

I figured it out. Thanks for pointing out it would be in the formula and not the visual filters.

 

The "1 - Expression" was what was throwing the months off, since the formula had no data to subtract in July, Aug, etc... the expression was resulting in 1 or 100%.

 

I had to create another expression for the yellow line and now the slicer seems to be affecting the line chart the way I would like it to.

 

Capture.PNGCaptur2.PNG

View solution in original post

5 REPLIES 5
Cmcmahan
Resident Rockstar
Resident Rockstar

That's not January data showing at 100%.  That's Blank data, where there is no month.

You can probably fix this by setting a visual level filter with advanced filtering set so that [month] is not (Blank).

 

 

This seems likely to be caused by whatever measure you're using to determine the value of the yellow line.  If you can show us that expression, we should be able to fix this without monkeying about with visual level filters.

It's 100% January in the middle visual, that's because I have January selected in the visual level filter, but the slicer (not shown) starts at 2/1. It's Blank in the 3rd because I set the slicer back to 1/1 and selected all months.

 

I agree it seems to be in that yellow line, i will see if i can post anything helpful, I'm not the best at power bi and i didn't make these measures so let me see what i can provide

You should be able to check the Values section of the Fields tab, to the right of the report.  One of them should be the field used to create the yellow line. 

 

For example, to figure out how Increased or Decreased is determined, I clicked the visual, and found the corresponding calculated column. 
snipa.PNG

Then at the top, it displayed the expression:

snipb.PNG

 

If you can share that expression, we can figure out why it gives a value of 100% when there's no data.

I figured it out. Thanks for pointing out it would be in the formula and not the visual filters.

 

The "1 - Expression" was what was throwing the months off, since the formula had no data to subtract in July, Aug, etc... the expression was resulting in 1 or 100%.

 

I had to create another expression for the yellow line and now the slicer seems to be affecting the line chart the way I would like it to.

 

Capture.PNGCaptur2.PNG

So it would have to be because it's doing "1 - 0 = 100%" as in the expression below. It's got nothing to subtract from 1 July - December.
 
Other Non-Compliance *yellow line* = 1 - ([Rank non-Compliance *blue line*]+[RDD non-Compliance *dark blue line*])
 
 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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