Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
rammarthi
Creator
Creator

Line Charts Months vs Years and Dates Vs Months

Hi All,

I have a created the following line chart with from a date with Month(Date) on x axis and Year(Date) on Y axis. and expression as Sum(High)

Capture.PNG

A similar kind of graph I want for Days in a Month vs Months in a Year. But that is spread as show on the right hand side.

Is there a function like Dayinaquarter for Months also, so that can help me fix this.

Thanks in Advance

Ram Marthi

1 Solution

Accepted Solutions
Gysbert_Wassenaar

The Day() function will return the day of the month of a date. Is that what you're looking for? It looks like you're now using the date formatted as DD in the chart on the right. That means it's still the date field that's the dimension on the x-axis. You probably want to change that to the Day field if that exists or Day(Date) if it doesn't.


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar

The Day() function will return the day of the month of a date. Is that what you're looking for? It looks like you're now using the date formatted as DD in the chart on the right. That means it's still the date field that's the dimension on the x-axis. You probably want to change that to the Day field if that exists or Day(Date) if it doesn't.


talk is cheap, supply exceeds demand
rammarthi
Creator
Creator
Author

Using the Text of date of Date in the script does the magic.

LOAD Date,

     Text( Date( Date, 'DD' ) ) as [Day of Month],

     Month( Date ) as [Month Name],

     Year(Date) as Year,

And this is how the line chart looks like:

1.PNG

rammarthi
Creator
Creator
Author

Yes, Day(Date) also gives the same results I just checked. Thanks for the response.

1.PNG