Forum Discussion
X axis not displaying properly
Hi everyone
I am trying to display Total Sales against End of Month. My X Axis needs to be Continuous in the setting and not Categorical.
Even though I have data in January, the chart starts in February. Odd enough, the tool tip shows correct data for January.
I have added a column in the PBI Table End of Month ---- End of month = EOMONTH( Sheet1[Date], 0)
Thank you
My table
| Date | Sales |
| 01-Jan-24 | 10 |
| 01-Jan-24 | 10 |
| 02-Jan-24 | 30 |
| 04-Jan-24 | 50 |
| 06-Feb-24 | 140 |
| 07-Mar-24 | 12 |
| 21-Mar-24 | 8 |
How my report look like
Hello JaweedL ,
I think your issue is that the visual is sorted alphabetically, what you should do is to have a column that sorts months as the number of months.
refer to this
https://youtu.be/NlX7Cp2P0d4?si=VjA6mfs6P4zafF7AHi,
Try this approach
- Create a Calendar Table with calculated column formulas for Year, Month name and Month number. Sort the Month name by the Month number
- Create a relationship (Many to One and Single) from the Date column of the Fact Table to the Date column of th Calendar Table
- To your X-axis, drag Year and Month name from the calendar Table
- Write this measure
Measure = sum(Data[Sales])
Hope this helps.
5 Replies
- Ashish_Mathur
Super User
Hi,
Try this approach
- Create a Calendar Table with calculated column formulas for Year, Month name and Month number. Sort the Month name by the Month number
- Create a relationship (Many to One and Single) from the Date column of the Fact Table to the Date column of th Calendar Table
- To your X-axis, drag Year and Month name from the calendar Table
- Write this measure
Measure = sum(Data[Sales])
Hope this helps.
- JaweedL
Helper I
Thank you Sir. Working.
- Ashish_Mathur
Super User
You are welcome.
- Idrissshatila
Super User
Hello JaweedL ,
I think your issue is that the visual is sorted alphabetically, what you should do is to have a column that sorts months as the number of months.
refer to this
https://youtu.be/NlX7Cp2P0d4?si=VjA6mfs6P4zafF7A- JaweedL
Helper I
Thank you.