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
kiwii
Regular Visitor

Power BI - X axis showing days instead of months

Hello, 

 

I have setted autocalendar below and used column Month for X axis of a column chart.

Calendar =
 ADDCOLUMNS(
  CALENDARAUTO(),
  "Year", YEAR([Date]),
  "Month", EOMONTH([Date],-1)+1)
 
I want to see total of KPI per month in column chart. If I filter some category, I will get overview per days instead of months. I want to see total per month, not days. Please see the picture - there are days on X axis, I just want to see month July when category filtered.
 
kiwii_0-1698921729492.png

 

1 ACCEPTED SOLUTION

Hi @kiwii ,

You can follow the steps below to get it:

  1. Keep the data type of the field [Date] as "Date"
  2. Put the Date Hierarchy [Year] and [Month] on the visual just as below screenshot

         vyiruanmsft_0-1699943066519.png

If the above one can't help you get the expected result, please provide some raw data in your tables (exclude sensitive data) with Text format and your visual settings. It would be helpful to find out the solution. You can refer the following link to share the required info:

How to provide sample data in the Power BI Forum

 

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Idrissshatila
Super User
Super User

hello @kiwii ,

 

try replacing this  EOMONTH([Date],-1)+1) with this  MONTH([Date])



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




I already tried that but then when I change data type to Date, again I can see dates instead of months on X axis. If I leave date type Text, the formatting on X axis does not look good (see below example for Jul 2023)

 

kiwii_0-1698924196617.png

 

Hi @kiwii ,

You can follow the steps below to get it:

  1. Keep the data type of the field [Date] as "Date"
  2. Put the Date Hierarchy [Year] and [Month] on the visual just as below screenshot

         vyiruanmsft_0-1699943066519.png

If the above one can't help you get the expected result, please provide some raw data in your tables (exclude sensitive data) with Text format and your visual settings. It would be helpful to find out the solution. You can refer the following link to share the required info:

How to provide sample data in the Power BI Forum

 

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.