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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
powerbibds
Regular Visitor

How to remove gap in line chart in Power BI

Hello everyone, everything good ?

I have a problem, because when I create a line graph, the x-axis is composed of (month-day), the y-axis values of temperatures and the legend categorical values of situation. The objective is to remove this gap from the line chart. Also the color of the line while the situation is equal to 1 has to be red and when the situation is equal to 2 it has to be blue.

 

Thank you very much!!

 

time_stamptemperaturesituation
04/03/2022 15:00:00291
04/03/2022 17:00:00291
04/03/2022 19:00:00801
04/03/2022 22:00:002201
05/03/2022 02:00:002141
05/03/2022 05:00:001872
05/03/2022 11:00:001222
05/03/2022 15:00:00852
05/03/2022 17:00:00632

 

 

Erro graph:

 

gap.png

 

2 REPLIES 2
amitchandak
Super User
Super User

@powerbibds , With legend I doubt you can remove this gap,As Values are mutually exclusive use it without legend

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

But how do I set the graph line colors differently when the situation variable changes?
Like the example below.

 

Thxx

 

powerbibds_0-1672800827264.png

 

Helpful resources

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

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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