Forum Discussion

JClark's avatar
JClark
Frequent Visitor
4 years ago
Solved

X Axis Month Format

I have a line graph where I'm showing a count by Month with a plot point each day separated by a Year legend but need help on how to calculate/format my X-axis:

 

 

It's currently:

 

DateFormat(MD) = DATE(0,Month([Date]),Day([Date]))
 
Ideally I'd be able to chagne the format to show only months but it doesn't seem to affect anything when I do. Using the FORMAT() calculation turns dates in to text which throws things off as well since I have the X-axis by Month and Day for the additional plot points.
 
Thanks in advance.

 

  • Hi JClark ,

     

    Try using the date hierarchy as the x-axis of the line chart and set it to type "Continuous". Then extend the hierarchy to the lowest level.

     

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
    Best Regards,
    Winniz
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

4 Replies

  • v-kkf-msft's avatar
    v-kkf-msft
    Community Support

    Hi JClark ,

     

    Try using the date hierarchy as the x-axis of the line chart and set it to type "Continuous". Then extend the hierarchy to the lowest level.

     

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
    Best Regards,
    Winniz
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

  • Hi JClark ,

    If you having a proper Date column, I would suggest that you use the inbuilt formatting option available for date instead of a calculated column.

     

    I think that could by itself solve your problem

    Find below the screenshot for all the available formats

     

     

  • JClark's avatar
    JClark
    Frequent Visitor

    Hi Thejeswar , thanks for the reply.

     

    I think this would be the solution if I wanted plot point for each month rather than each day, the graph would then look like this:

     

     

    The X-axis is perfect here but I lose all the plot points by day. If you know a solution to have the lines like the first graph I posted that would be spot on.

    • Thejeswar's avatar
      Thejeswar
      Super User

      Hi JClark , 

      Don't think there is any direct way we can achieve this. But I can provide a workaround. May be that could help with your requirement. 

       

      We need to use the Axis and Legend as shown in the below screenshot. Drill down to the least level in the x-axis. The Graph would look like the one below, where you see all the month and the date level values for each month

       

      We also need to turn off the Concatenate labels option under x axis.

      The Final graph would be as shown below