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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Lucy64
Advocate II
Advocate II

Line & Column Chart

I have created the following chart to show current employees total in the line.

Image1.PNG

 

 

 

 

 

 

 

 

 

 

 

 

However when I view with a filter to select a few years the line does not end on the years selected.  How can I remove the additional years on the visual?

Image2.PNG

 

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion

@Lucy64 Can you make this file work with the Year as a Slicer and not using the Timeline?

 

Sample2.png

 

EDIT: To make it work with the Timeline get rid of the IF statements that replace blank with 0 in both Measures!

That seems to work

 

Sample3.png

 

 

View solution in original post

9 REPLIES 9
Lucy64
Advocate II
Advocate II

In case you need details of the measures, I took them from this example here

Sean
Community Champion
Community Champion

@Lucy64 Are you using the same field in the Slicer that you using in the Shared Axis of the Chart?

Yes Sean, it is the date field from the date table.  On the image I sent you I was using the Year column but I switched it to the date field (same as in the chart) and I get the same result.

 

@Lucy64

 

In this scenario, please make sure the "Show item with no data" for the field on X-Axis is not selected.

54.PNG

Then you can apply visual level filter to filter the empty or 0 values.

 

34.PNG

44.PNG

 

Regards,

 

Hi Simon,

 

"Show item with no data" is not selected.

 

When I try to filter on the line value I get Unexpected Error

 

Sean
Community Champion
Community Champion

@Lucy64 What do you get if you create the same Chart in the Sample file you uploaded?

And select the Years as in the picture below? If you can simulate your condition in the sample file - upload it again

 

Sample.png

In the sample file where I got the measures the line value is working when I filter, I cannot duplicate the errors I have in my dashboard, let me share my file with you here

 

Sean
Community Champion
Community Champion

@Lucy64 Can you make this file work with the Year as a Slicer and not using the Timeline?

 

Sample2.png

 

EDIT: To make it work with the Timeline get rid of the IF statements that replace blank with 0 in both Measures!

That seems to work

 

Sample3.png

 

 

Thanks for your help.  Greatly appreciated.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors