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

Removing X axis values from chart

I have a report where I am tracking production values daily and putting them on a line graph. I have this by calendar day and I want to be able to have a bookmark where the user will be able to switch between calendar day and business day.

 

I have a pretty standard date table in my report and then I have an imported table where we have our company business days all mapped out. I successfully have a graph by calendar and and a graph by business day but when I look at the graph by business day there is a gap between the last business day of the last month and the first business day of the next month. For example it goes from 2/20/2020 to 3/1/2020 so there is an odd diagonal line in my line chart. Is there anyway I can get the visual to go from 2/20/2020 to 3/1/2020 without leaving space for the days between? Also if there is just a completely better way to do what I am trying to do I am open to it. 

 

This is how my dates are set up. The date table was created with

 

DATE = 
VAR MINYEAR = YEAR ( MIN ( Production[Day] ) )
VAR MAXYEAR = YEAR ( MAX ( Production[Day] ) ) 
RETURN
ADDCOLUMNS (
    FILTER (
        CALENDARAUTO( ),
        AND ( YEAR ( [DATE] ) >= MINYEAR, YEAR ( [DATE] ) <= MAXYEAR )
    ),
    "CALENDAR YEAR", "CY " & YEAR ( [DATE] ),
    "MONTH NAME", FORMAT ( [DATE], "MMMM" ),
    "MONTH NUMBER", MONTH ( [DATE] ),
    "WEEKDAY", FORMAT ( [DATE], "DDDD" ),
    "WEEKDAY NUMBER", WEEKDAY( [DATE] ),
    "Quarter", "Q" & TRUNC((MONTH([Date])-1)/3+1
))

 

And is linked to my business days table here. The business days are formatted 2/1/2020 to 2/20/2020 so its MM/"Business Day"/YYYY

 

3-28-2020 6-58-48 PM.png

 

 

This is what my graph looks like by business day and ideally I want to remove the yellow gaps between the days on the X axis. 

 

 

3-28-2020 7-04-52 PM.png

 

 

Thank you.

1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hi @Anonymous ,

 

Create a calendar table using below dax expression:

 

Table 2 = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))

 

Then create relationships between the 2 tables.

Last in the line chart,use the calendar date as the X -axis,and you will see:

Annotation 2020-03-30 165751.png

 

For the related .pbix file,pls click here.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

 

 

View solution in original post

3 REPLIES 3
v-kelly-msft
Community Support
Community Support

Hi @Anonymous ,

 

Create a calendar table using below dax expression:

 

Table 2 = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))

 

Then create relationships between the 2 tables.

Last in the line chart,use the calendar date as the X -axis,and you will see:

Annotation 2020-03-30 165751.png

 

For the related .pbix file,pls click here.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

 

 

Greg_Deckler
Community Champion
Community Champion

Is your x-axis categorical or continuous? Try switching it.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

@Anonymous 

Put a visual level filter and remove nonworking days or value =0

Filrer Pane Visual Level filter.png

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

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