Announcements
cancel
Showing results for
Did you mean:
Creator III

## comparing daily sales between years

Hi,

I am trying to put two dimensions on the line chart in order to compare daily sales for the chosen years:

1. Date(Date,'MM/DD') - custom dimension

2. Year

Unfortunately, it creates duplicated dimensions equal to the number of years I have and does not combine it (in my example i have three years horizon and it creates three 01/01 values, 02/01 values and so on)

PS: I am still able to make it when the dimension is "Day of the Year" (see the screenshot below), but is does not work for me - I need to see actual dates (DAY and MONTH) on the X-axis.

1 Solution

Accepted Solutions
MVP

My bad... where did you put the extra bracket, here?

Date(SetDateYear(Date, Year(Today())), 'MM/DD')

10 Replies
Creator III
Author

Guys

I'm still struggling with this

I am trying to create custom dimension where, for example, February,23,2011 would show as 02/23

1. I created interim dimension MonthNumber = num(month). It works.

2. Then I am trying to create dimension Month&Date = day([date])&"/"&[monthnumber]

It won't allow this as [monthnumber] is invalid filed name. Why?

Thank you

MVP

May be try like this for your calculated dimension

Date(SetDateYear(Date, Year(Today()), 'MM/DD')

Champion III

OR

DATE([date],'MM/DD')

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Creator III
Author

Yeah
I just figured it out myself
Date([Дата], 'MM/DD')

Didn't realize that I can just omit the YY

thank you, Guys

Creator III
Author

it is not working actually
The appearance is correct (MM/DD), but somehow it still stores the YY in the Dimension

That's what I ended up with:

num(month(DATE),'00')&'/'&Day([DATE])

And that's how it looks like:

MVP

Did you give this a shot?

Date(SetDateYear(Date, Year(Today()), 'MM/DD')

Creator III
Author

returns the error (although I ammended the formula with one more closure bracket)

MVP

My bad... where did you put the extra bracket, here?

Date(SetDateYear(Date, Year(Today())), 'MM/DD')

Creator III
Author

no, in the end
now it works, thank you

although i can't understand why we need point (2) below:

1. it takes the DATE

2. replaces the original year with the year from the latest available date

3. then it cut's the year off

Tags
Community Browser