Forum Discussion

beginner's avatar
beginner
Icon for Helper I rankHelper I
2 years ago

How to visualize Months as J F M.... ?

my table look like this 

Month|Monthno|Value

Jan|1|100

Feb|2|200

........

 

 

I want to visualize this as J F M... in the graph by respecting the values for each month in a YTD format sorted J F M format. How do I do this? Btw, I only have the current year values so it won't be confused by any other years. 

2 Replies

  • You will have to create two calculated columns for this:

    1 - Column Month(m) or anything then use the formula =left(table[month],1) to get the first letter of the month.

    2 - Column Month(#) to get the month number, this will help you while sorting your Month(m) axis in a chart.

          in the column, type/use this formula.

    Month(#) =
    SWITCH(
        Sales[Month],
        "January", 1,
        "February", 2,
        "March", 3,
        "April", 4,
        "May", 5,
        "June", 6,
        "July", 7,
        "August", 8,
        "September", 9,
        "October", 10,
        "November", 11,
        "December", 12,
        BLANK()
    )
    The next thing would be selecting the Month(m) column while in table view, then under column tools, press on sort by column.
    A drop down of all the columns will appear then select Month(#). This will ensure that on chart sorting by Month(m) the months will be sorted 1-12 or 12-1.
    I hope this helps you out!