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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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!:
The Definitive Guide to Power Query (M)

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.