Forum Discussion

JaweedL's avatar
JaweedL
Icon for Helper I rankHelper I
2 years ago
Solved

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

DateSales
01-Jan-2410
01-Jan-2410
02-Jan-2430
04-Jan-2450
06-Feb-24140
07-Mar-2412
21-Mar-248

How my report look like

  • Hi,

    Try this approach

    1. Create a Calendar Table with calculated column formulas for Year, Month name and Month number.  Sort the Month name by the Month number
    2. Create a relationship (Many to One and Single) from the Date column of the Fact Table to the Date column of th Calendar Table
    3. To your X-axis, drag Year and Month name from the calendar Table
    4. Write this measure

    Measure = sum(Data[Sales])

    Hope this helps.

5 Replies

  • Hi,

    Try this approach

    1. Create a Calendar Table with calculated column formulas for Year, Month name and Month number.  Sort the Month name by the Month number
    2. Create a relationship (Many to One and Single) from the Date column of the Fact Table to the Date column of th Calendar Table
    3. To your X-axis, drag Year and Month name from the calendar Table
    4. Write this measure

    Measure = sum(Data[Sales])

    Hope this helps.