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
brianf408
New Member

Date formatting on X-axis

I am having some trouble with dates on the X-axis for an area chart.  I am pulling a daily report and target sheet that is broken down by day for a 6-month period.  The chart is only pulling randomly selected dates from my query which is omitting the majority of my data.  I cannot edit the X-axis scale or formatting (I also need to remove the named day of the week, wasting lots of space).  Any thoughts?  My X-axis is set to categorical, if I set to continuous it just goes to month/year and omits even more data.

3 REPLIES 3
Greg_Deckler
Super User
Super User

@brianf408, I am with @greggyb on this one, can't reproduce randomly selected dates. Are you on the January update of Power BI Desktop or are you in Desktop? This was posted in Developer forum. I am using standard Area chart visualization in Desktop. I vaguely recall in earlier versions that sometimes if there were lots of dates that things like line charts and such would display a "representative set" of dates in the x-axis but I think that was in Excel with Power Pivot a long time ago and I believe that all of the values were actually there, just not every date displayed in the axis.

 

You can see screen shot below:

 

areachart.png


@ 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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

 

Has this changed in Power BI yet?  

 

Power  BI does a sampling of data if the number of records being aggregated to present data by x-axis values is too much to show on chart.  

 

The solution is to do aggregation by date and then chart that aggregated data  or to reduce the number of records being presented on chart eg 2 months instead of 6 months. Neither is ideal. I want my viz tool to do that work for me. 

greggyb
Resident Rockstar
Resident Rockstar

I'm not able to reproduce on the excluded labels issue. Do you have any filters on other fields that might be excluding certain days?

 

As for the display formatting of the axis labels, you can set the Data Format in the Data Modelling ribbon menu. This will be available whenever you have a field or measure selected, either in the field list on the right side of the screen, or if you go to the Data pane and select the field's column in the table. See image below:

Capture.JPG

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.

Top Solution Authors